我在django项目中有以下结构。我有一个providers.py文件,其中: from django.conf import settings
from project.utils.firewalls import fw 在提供者中,我需要在设置中定义一些变量。然后在firewalls.py中,我有: from django.conf import settings 同样在firewalls.py中,我确实有一些代码需要获取在设置中定义的变量。这与我在这两个文件中导入djang
我正在使用django-guardian来处理对象权限。在我的settings.py中:但是,当我尝试运行服务器时,我得到一个配置不正确的错误:
django.core.exceptions.ImproperlyConfigured: In order to use django-guardian's ObjectPermissionBackend authorization backend you have to configure注释掉导入会导