【发布时间】:2012-05-03 18:36:42
【问题描述】:
我在“/projectname/projectname/settings.py”中设置了ANONYMOUS_USER_ID
ANONYMOUS_USER_ID=-1
但是当我使用 syncdb 时,它的 Guardian.conf.settings 会引发 ImproperlyConfigured。
raise ImproperlyConfigured("为了使用 django-guardian 的" django.core.exceptions.ImproperlyConfigured:为了使用 django-guardian 的 ObjectPermissionBackend 授权后端,您必须在设置模块中配置 ANONYMOUS_USER_ID
【问题讨论】: