diff options
Diffstat (limited to 'config/settings.py')
-rw-r--r-- | config/settings.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/config/settings.py b/config/settings.py index 52d2314..b95c18d 100644 --- a/config/settings.py +++ b/config/settings.py @@ -25,6 +25,7 @@ AUTH_PROFILE_MODULE = "accounts.UserProfile" AUTH_USER_MODEL = "accounts.User" DEFAULT_FILE_STORAGE = config('DEFAULT_FILE_STORAGE') +INTERNAL_IPS = config('INTERNAL_IPS') AWS_S3_OBJECT_PARAMETERS = { 'CacheControl': 'max-age=86400', @@ -39,6 +40,9 @@ REGISTRATION_SALT = 'Astra inclinant, sed non obligant' # Django Rest Framework REST_FRAMEWORK = { + 'DEFAULT_AUTHENTICATION_CLASSES': ( + 'rest_framework.authentication.SessionAuthentication', + ), 'DEFAULT_PERMISSION_CLASSES': ( 'rest_framework.permissions.IsAuthenticated', ) @@ -60,6 +64,7 @@ THIRD_PARTY_APPS = [ 'taggit_serializer', 'django_extensions', 'rest_framework', + 'debug_toolbar' ] LOCAL_APPS = [ 'utils', @@ -75,6 +80,7 @@ MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', + 'debug_toolbar.middleware.DebugToolbarMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', @@ -164,5 +170,23 @@ STATIC_ROOT = BASE_DIR+'/static/' MEDIA_URL = '/media/' MEDIA_ROOT = BASE_DIR+'/media/' +LOGOUT_REDIRECT_URL = "/" + EMAIL_BACKEND = "django.core.mail.backends.filebased.EmailBackend" EMAIL_FILE_PATH = os.path.join(BASE_DIR, "sent_emails") + +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'handlers': { + 'console': { + 'class': 'logging.StreamHandler', + }, + }, + 'loggers': { + 'django': { + 'handlers': ['console'], + 'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'), + }, + }, +} |