This is my form:
from django.db import models
from django.forms import ModelForm
from django import forms
class Blog(models.Model):
blog_id = models.CharField(max_length=100)
class TumblrForm(ModelForm):
class Meta:
model = Blog
fields = ('blog_id')
widgets = {
'blog_id':forms.RadioSelect(),
}
I basically want to show the user a list of forms.
This is where I instantiate it:
form = TumblrForm(instance=blogs_id)
I get an error saying:
Unknown field(s) (b, d, g, i, l, o, _) specified for Blog
Any idea what’s happening here?
Try adding a comma after ‘blog_id’
It looks like the string ‘blog_id’ is being interpreted as a list of chars rather than a single string specifying a field (notice now the error message contains all the characters of blog_id).