We don't use Django Guardian

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2022-03-09 19:48:27 +01:00
parent 8cb3815777
commit e9ab9e6c27
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
2 changed files with 1 additions and 8 deletions

View File

@ -108,11 +108,8 @@ AUTH_PASSWORD_VALIDATORS = [
}, },
] ]
# Django Guardian object permissions
AUTHENTICATION_BACKENDS = ( AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend', # this is default 'django.contrib.auth.backends.ModelBackend', # this is default
'guardian.backends.ObjectPermissionBackend',
) )
REST_FRAMEWORK = { REST_FRAMEWORK = {
@ -126,10 +123,6 @@ REST_FRAMEWORK = {
] ]
} }
ANONYMOUS_USER_NAME = None # Disable guardian anonymous user
GUARDIAN_GET_CONTENT_TYPE = 'polymorphic.contrib.guardian.get_polymorphic_base_content_type'
# Internationalization # Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/ # https://docs.djangoproject.com/en/2.2/topics/i18n/

View File

@ -15,7 +15,7 @@ Including another URLconf
1. Import the include() function: from django.urls import include, path 1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
""" """
from . import settings from django.conf import settings
from django.contrib import admin from django.contrib import admin
from django.contrib.staticfiles.urls import static from django.contrib.staticfiles.urls import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib.staticfiles.urls import staticfiles_urlpatterns