0
'list' object has no attribute '_meta'
forms.py:
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(),
}
表單創建:
form = TumblrForm(instance=blogs_id) #blogs_id is a list of blog urls
我要去哪裏錯了?