Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
oser-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hamza Touizrat
oser-backend
Commits
ec095477
Commit
ec095477
authored
2 years ago
by
root
Browse files
Options
Downloads
Patches
Plain Diff
update settings
parent
84ad9826
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
oser_backend/settings/common.py
+2
-23
2 additions, 23 deletions
oser_backend/settings/common.py
oser_backend/settings/dev.py
+2
-1
2 additions, 1 deletion
oser_backend/settings/dev.py
oser_backend/settings/production.py
+7
-0
7 additions, 0 deletions
oser_backend/settings/production.py
with
11 additions
and
24 deletions
oser_backend/settings/common.py
+
2
−
23
View file @
ec095477
...
...
@@ -9,6 +9,8 @@ from dotenv import load_dotenv
import
dj_database_url
import
pymdownx.emoji
import
mimetypes
mimetypes
.
add_type
(
"
text/css
"
,
"
.css
"
,
True
)
load_dotenv
()
...
...
@@ -209,29 +211,6 @@ AUTH_PASSWORD_VALIDATORS = [
# NOTE: all loggers within this project should be named 'web.<logger_name>'
# 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
...
...
This diff is collapsed.
Click to expand it.
oser_backend/settings/dev.py
+
2
−
1
View file @
ec095477
...
...
@@ -5,7 +5,8 @@ from .common import *
from
.common
import
BASE_DIR
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)
...
...
This diff is collapsed.
Click to expand it.
oser_backend/settings/production.py
+
7
−
0
View file @
ec095477
...
...
@@ -6,6 +6,10 @@ from aws.conf import *
from
.common
import
*
import
mimetypes
mimetypes
.
add_type
(
"
text/css
"
,
"
.css
"
,
True
)
# NOTE: `or False` ensures the value is `False` (the boolean)
# if the value given in environment is false-y (e.g. empty string)
# Otherwise may lead to unexpected bugs.
...
...
@@ -14,8 +18,11 @@ from .common import *
DEBUG
=
os
.
environ
.
get
(
'
DEBUG
'
,
False
)
or
False
ALLOWED_HOSTS
=
[
'
127.0.0.1
'
,
'
localhost
'
,
'
oser-cs.fr
'
,
'
oser.cs-campus.fr
'
,
]
# Security
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment