我在夹层中使用Django1.7。我创建了简单的配置文件(根据Mezzanine文档),存储在单独的应用程序“配置文件”中:
class RoadmapProfile(models.Model): user = models.OneToOneField("auth.User") fullname = models.CharField(max_length=100, verbose_name="Full name")
创建迁移会返回:
Migrations for 'profiles': 0001_initial.py: - Create model RoadmapProfile
-
当我运行“迁移配置文件”时:
Operations to perform: Apply all migrations: profiles Running migrations: No migrations to apply.
问题是,当我尝试打开与mezzanine.accounts相关的任何页面(例如更新帐户)时,它崩溃并显示:
OperationalError at /accounts/update/ no such column: profiles_roadmapprofile.fullname
我做错了什么?
'profiles'
'django_migrations'
python manage.py makemigrations
python manage.py migrate