Django:Syncdb 错误地警告多对多字段已过时
我有一个 Django 应用程序,其中一个应用程序与 UserProfile 具有多对多关系。但每当我执行同步数据库时,它都会警告我 app_users 是过时的字段
The following content types are stale and need to be deleted:
Apps | app_users
#settings.py
AUTH_PROFILE_MODULE = 'kprofile.UserProfile'
#Apps/models.py
class app(models.Model):
....
users = models.ManyToManyField(UserProfile)
现在,除了规则内的某些身份验证目的之外,我不在视图内使用 UserProfile。用户配置文件只能从管理界面附加到应用程序。如何阻止 djangosyncdb 给我这个错误/不正确的警告?
I have a django application where one application has many-to-many relationship with a UserProfile. But whenever I do a syncdb, it warns me that app_users is stale field
The following content types are stale and need to be deleted:
Apps | app_users
#settings.py
AUTH_PROFILE_MODULE = 'kprofile.UserProfile'
#Apps/models.py
class app(models.Model):
....
users = models.ManyToManyField(UserProfile)
Now I don't use UserProfile inside view except for some authentication purposes inside rules. And a UserProfile can be attached to an App only from admin interface. How can I stop django syncdb from giving me this false/incorrect warning?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请注意消息。它并不是声称您的字段已过时 - 它正在谈论 Content 中的条目类型模型。
在 shell 中,执行以下操作:
Pay attention to the message. It's not claiming that your field is stale - it's talking about an entry in the Content Types model.
In the shell, do this: