【发布时间】:2013-01-28 12:27:22
【问题描述】:
如何才能成功删除过时的内容?
键入 yes 会产生以下结果:
Creating tables ...
以下内容类型已过时,需要删除:
auth | message
通过外键与这些内容类型相关的任何对象也将 被删除。您确定要删除这些内容类型吗? 如果您不确定,请回答“否”。
Type 'yes' to continue, or 'no' to cancel: yes
Traceback(最近一次调用最后一次): ...
raise errorclass, errorvalue
django.db.utils.DatabaseError:
(1146, "Table '<db_name>.auth_group_permissions' doesn't exist")
Process finished with exit code 1
我尝试的另一件事是:
from django.contrib.contenttypes.models import ContentType
ct = ContentType.objects.get(app_label='auth',model='messages')
我收到以下信息:
DoesNotExist: ContentType matching query does not exist.
【问题讨论】:
标签: python django content-type syncdb