我刚将一个网站从Django-CMS 2.3.5迁移到了2.4.1(通过Stackoverflow的帮助),并运行在Django 1.4下。
现在我正在升级到Django 1.5,这很困难,因为我需要将旧的独立用户配置文件更新为新的自定义用户模型。我遵循了这里的优秀指导,并且用settings.AUTH_USER_MODEL
替换了所有对User
的引用。
不幸的是,Django-CMS的模型显然仍然引用User
:当我输入manage.py runserver
时,会出现以下错误:
CommandError: One or more models did not validate:
cms.pagemoderatorstate: 'user' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.
cms.globalpagepermission: 'user' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.
cms.pagepermission: 'user' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.
cms.pageuser: 'user_ptr' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.
cms.pageuser: 'created_by' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.
cms.pageusergroup: 'created_by' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.
我该如何让Django-CMS使用新的用户模型?
谢谢!