Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nk20
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
BDE
nk20
Merge requests
!47
modular settings start
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
modular settings start
modular_settings
into
master
Overview
0
Commits
2
Pipelines
1
Changes
4
Merged
Pierre-antoine Comby
requested to merge
modular_settings
into
master
5 years ago
Overview
0
Commits
2
Pipelines
1
Changes
4
Expand
👍
0
👎
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
7d616eb1
2 commits,
5 years ago
4 files
+
61
−
43
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
note_kfet/settings/__init__.py
+
31
−
3
Options
@@ -33,14 +33,42 @@ if app_stage == 'prod':
DATABASES
[
"
default
"
][
"
PASSWORD
"
]
=
os
.
environ
.
get
(
'
DJANGO_DB_PASSWORD
'
,
'
CHANGE_ME_IN_ENV_SETTINGS
'
)
SECRET_KEY
=
os
.
environ
.
get
(
'
DJANGO_SECRET_KEY
'
,
'
CHANGE_ME_IN_ENV_SETTINGS
'
)
ALLOWED_HOSTS
.
append
(
os
.
environ
.
get
(
'
ALLOWED_HOSTS
'
,
'
localhost
'
)
)
ALLOWED_HOSTS
=
[
os
.
environ
.
get
(
'
ALLOWED_HOSTS
'
,
'
localhost
'
)
]
else
:
from
.development
import
*
try
:
#in secrets.py defines everything you want
from
.secrets
import
*
except
ImportError
:
pass
# env variables set at the of in /env/bin/activate
# don't forget to unset in deactivate !
if
"
cas
"
in
INSTALLED_APPS
:
MIDDLEWARE
+=
[
'
cas.middleware.CASMiddleware
'
]
# CAS Settings
CAS_AUTO_CREATE_USER
=
False
CAS_LOGO_URL
=
"
/static/img/Saperlistpopette.png
"
CAS_FAVICON_URL
=
"
/static/favicon/favicon-32x32.png
"
CAS_SHOW_SERVICE_MESSAGES
=
True
CAS_SHOW_POWERED
=
False
CAS_REDIRECT_TO_LOGIN_AFTER_LOGOUT
=
False
CAS_INFO_MESSAGES
=
{
"
cas_explained
"
:
{
"
message
"
:
_
(
u
"
The Central Authentication Service grants you access to most of our websites by
"
u
"
authenticating only once, so you don
'
t need to type your credentials again unless
"
u
"
your session expires or you logout.
"
),
"
discardable
"
:
True
,
"
type
"
:
"
info
"
,
# one of info, success, info, warning, danger
},
}
CAS_INFO_MESSAGES_ORDER
=
[
'
cas_explained
'
,
]
AUTHENTICATION_BACKENDS
+=
(
'
cas.backends.CASBackend
'
,)
if
"
debug_toolbar
"
in
INSTALLED_APPS
:
MIDDLEWARE
.
insert
(
1
,
"
debug_toolbar.middleware.DebugToolbarMiddleware
"
)
INTERNAL_IPS
=
[
'
127.0.0.1
'
]
Loading