Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
b9148197
Unverified
Commit
b9148197
authored
6 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Use django-local-settings for configuration.
parent
17bd3358
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
biscuit/core/settings.py
+14
-6
14 additions, 6 deletions
biscuit/core/settings.py
setup.py
+1
-0
1 addition, 0 deletions
setup.py
with
15 additions
and
6 deletions
biscuit/core/settings.py
+
14
−
6
View file @
b9148197
import
os
import
os
from
local_settings
import
load_and_check_settings
,
LocalSetting
,
SecretSetting
from
.util
import
get_app_packages
from
.util
import
get_app_packages
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
BASE_DIR
=
LocalSetting
(
default
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
)
# SECURITY WARNING: keep the secret key used in production secret!
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY
=
'
wvo@&^9@yi4(eahof$i2v3j#$=%lkw=%8=h2_eo6n5w!y9a*%u
'
SECRET_KEY
=
SecretSetting
(
default
=
'
wvo@&^9@yi4(eahof$i2v3j#$=%lkw=%8=h2_eo6n5w!y9a*%u
'
)
# SECURITY WARNING: don't run with debug turned on in production!
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG
=
True
DEBUG
=
LocalSetting
(
default
=
False
)
ALLOWED_HOSTS
=
[]
ALLOWED_HOSTS
=
LocalSetting
(
default
=
[]
)
# Application definition
# Application definition
...
@@ -96,9 +98,9 @@ AUTH_PASSWORD_VALIDATORS = [
...
@@ -96,9 +98,9 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/
# https://docs.djangoproject.com/en/2.1/topics/i18n/
LANGUAGE_CODE
=
'
de-de
'
LANGUAGE_CODE
=
LocalSetting
(
default
=
'
de-de
'
)
TIME_ZONE
=
'
Europe/Berlin
'
TIME_ZONE
=
LocalSetting
(
default
=
'
Europe/Berlin
'
)
USE_I18N
=
True
USE_I18N
=
True
...
@@ -118,3 +120,9 @@ MENU_SELECT_PARENTS = True
...
@@ -118,3 +120,9 @@ MENU_SELECT_PARENTS = True
LOGIN_REDIRECT_URL
=
'
index
'
LOGIN_REDIRECT_URL
=
'
index
'
LOGOUT_REDIRECT_URL
=
'
index
'
LOGOUT_REDIRECT_URL
=
'
index
'
STATIC_ROOT
=
LocalSetting
()
MEDIA_ROOT
=
LocalSetting
()
_settings
=
load_and_check_settings
(
globals
())
globals
().
update
(
_settings
)
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
0
View file @
b9148197
...
@@ -19,6 +19,7 @@ setup(
...
@@ -19,6 +19,7 @@ setup(
'
Django >= 2.0
'
,
'
Django >= 2.0
'
,
'
django-bootstrap3
'
,
'
django-bootstrap3
'
,
'
django-easy-audit
'
,
'
django-easy-audit
'
,
'
django-local-settings
'
,
'
django-simple-menu
'
,
'
django-simple-menu
'
,
],
],
classifiers
=
[
classifiers
=
[
...
...
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