Neo*_*Neo 12 python django django-models django-admin django-authentication
我有一个django应用程序,其中一个应用程序与UserProfile有多对多的关系.但每当我执行syncdb时,它都会警告我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)
Run Code Online (Sandbox Code Playgroud)
现在我不在视图中使用UserProfile,除了规则内的一些身份验证目的.并且UserProfile只能从管理界面附加到应用程序.如何阻止django syncdb给我这个错误/不正确的警告?
Dan*_*man 20
注意信息.它没有声称你的领域是陈旧的 - 它正在讨论内容类型模型中的条目.
在shell中,执行以下操作:
from django.contrib.contenttypes.models import ContentType
ct = ContentType.objects.get(app_label='Apps', model='app_users')
ct.delete()
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4823 次 |
最近记录: |