added first public views - no check for access rights at the moment

This commit is contained in:
Holger Sielaff
2024-07-12 17:22:17 +02:00
parent 7d53df6ea5
commit 3640ab759d
22 changed files with 386 additions and 69 deletions

View File

@@ -40,6 +40,9 @@ INSTALLED_APPS = [
'easy_thumbnails',
'colorfield',
'filer',
'rest_framework_swagger',
# 'guardian',
'api',
'content',
'quiz',
]
@@ -103,6 +106,12 @@ AUTH_PASSWORD_VALIDATORS = [
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
"""
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend', # this is default
'guardian.backends.ObjectPermissionBackend',
)
"""
# Internationalization
# https://docs.djangoproject.com/en/4.2/topics/i18n/
@@ -118,6 +127,7 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/
STATICFILES_DIRS = [BASE_DIR / 'static']
STATIC_URL = 'static/'
# Default primary key field type
@@ -187,3 +197,5 @@ THUMBNAILS = {
# }
}
}
REST_FRAMEWORK = {'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema'}