这是我的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(),
}
如何在视图中声明它并显示单选按钮列表。