我在 ./manage.py shell 中输入的以下代码
import datetime
from django.db import models
class ContactForm(forms.Form):
... date = DateField(widget=CalendarWidget)
... name = CharField(max_length=40, widget=OtherWidget)
...
Traceback (最近的电话last):
File "", line 1, in
File "", line 2, in ContactForm
NameError: name 'DateField' is not defined
如果还有什么要导入的。如果是这样,请告诉我,并提前感谢...