【发布时间】:2011-12-06 17:43:42
【问题描述】:
当我在我的项目上尝试 syncdb 时,我遇到了错误:
return Database.Cursor.execute(self, query, params)
django.db.utils.DatabaseError: no such table: main_region
forms.py
from main.models import Region
class ChangeState(forms.Form):
region = forms.ChoiceField(choices=Region.objects.all(),required=False)
state = forms.CharField(max_length=20)
models.py
class Region(models.Model):
name = models.CharField(max_length=50)
当我是评论行:
region = forms.ChoiceField(choices=Region.objects.all(),required=False)
syncdb 工作正常。
发生了什么事?
提前感谢您的解释。
【问题讨论】: