Skip to content
Snippets Groups Projects
Commit ec095477 authored by root's avatar root
Browse files

update settings

parent 84ad9826
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,8 @@ from dotenv import load_dotenv ...@@ -9,6 +9,8 @@ from dotenv import load_dotenv
import dj_database_url import dj_database_url
import pymdownx.emoji import pymdownx.emoji
import mimetypes
mimetypes.add_type("text/css", ".css", True)
load_dotenv() load_dotenv()
...@@ -209,29 +211,6 @@ AUTH_PASSWORD_VALIDATORS = [ ...@@ -209,29 +211,6 @@ AUTH_PASSWORD_VALIDATORS = [
# NOTE: all loggers within this project should be named 'web.<logger_name>' # NOTE: all loggers within this project should be named 'web.<logger_name>'
# so that the same configuration is applied to them. # so that the same configuration is applied to them.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '{levelname} {asctime} {module} {message}',
'style': '{',
},
},
'handlers': {
'console': {
'level': 'INFO',
'class': 'logging.StreamHandler',
'formatter': 'verbose',
},
},
'loggers': {
'web': {
'handlers': ['console'],
'level': os.environ.get('DJANGO_LOG_LEVEL', 'INFO'),
},
},
}
# Connect custom PasswordResetSerializer to override default # Connect custom PasswordResetSerializer to override default
......
...@@ -5,7 +5,8 @@ from .common import * ...@@ -5,7 +5,8 @@ from .common import *
from .common import BASE_DIR from .common import BASE_DIR
DEBUG = True DEBUG = True
ALLOWED_HOSTS = ['localhost','127.0.0.1','oser-backend'] ALLOWED_HOSTS = ['localhost','127.0.0.1','oser-cs.fr',
'oser.cs-campus.fr']
# Static files (CSS, JavaScript, Images) and media files (user-uploaded) # Static files (CSS, JavaScript, Images) and media files (user-uploaded)
......
...@@ -6,6 +6,10 @@ from aws.conf import * ...@@ -6,6 +6,10 @@ from aws.conf import *
from .common import * from .common import *
import mimetypes
mimetypes.add_type("text/css", ".css", True)
# NOTE: `or False` ensures the value is `False` (the boolean) # NOTE: `or False` ensures the value is `False` (the boolean)
# if the value given in environment is false-y (e.g. empty string) # if the value given in environment is false-y (e.g. empty string)
# Otherwise may lead to unexpected bugs. # Otherwise may lead to unexpected bugs.
...@@ -14,8 +18,11 @@ from .common import * ...@@ -14,8 +18,11 @@ from .common import *
DEBUG = os.environ.get('DEBUG', False) or False DEBUG = os.environ.get('DEBUG', False) or False
ALLOWED_HOSTS = [ ALLOWED_HOSTS = [
'127.0.0.1',
'localhost', 'localhost',
'oser-cs.fr', 'oser-cs.fr',
'oser.cs-campus.fr',
] ]
# Security # Security
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment