Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用django-guardian来实现对象级权限。我在模型中创建了自定义权限,我已经迁移并尝试重置迁移并重新迁移,但我仍然遇到DoesNotExist错误:
DoesNotExist
权限匹配查询不存在。
谁能帮我解决这个问题?
由于django-guardian 使用 django 创建权限,因此您必须首先像使用任何 Django 应用程序一样创建自定义权限。
你使用的是什么版本的 Django?如果它是 1.6 或更低版本,您可能必须运行syncdb --all才能创建权限。请参阅此处的文档。
syncdb --all