mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-29 12:50:55 +02:00
split settings config between development and production
This commit is contained in:
46
note_kfet/settings/production.py
Normal file
46
note_kfet/settings/production.py
Normal file
@ -0,0 +1,46 @@
|
||||
########################
|
||||
# Production Settings #
|
||||
########################
|
||||
# For local dev on your machine:
|
||||
# - Enabled by setting env variable DJANGO_APP_STAGE = 'prod'
|
||||
# - use Postgresql as db engine
|
||||
# - Debug should be false.
|
||||
# - should have a dedicated mail server
|
||||
# - and more ...
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'NAME': 'mydatabase',
|
||||
'USER': 'mydatabaseuser',
|
||||
'PASSWORD': 'mypassword',
|
||||
'HOST': '127.0.0.1',
|
||||
'PORT': '5432',
|
||||
}
|
||||
}
|
||||
|
||||
# Break it, fix it!
|
||||
DEBUG = True
|
||||
|
||||
# Mandatory !
|
||||
ALLOWED_HOSTS = ['127.0.0.1','note.comby.xyz']
|
||||
|
||||
# Emails
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||
# EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
# EMAIL_USE_SSL = False
|
||||
# EMAIL_HOST = 'smtp.example.org'
|
||||
# EMAIL_PORT = 25
|
||||
# EMAIL_HOST_USER = 'change_me'
|
||||
# EMAIL_HOST_PASSWORD = 'change_me'
|
||||
|
||||
SERVER_EMAIL = 'no-reply@example.org'
|
||||
|
||||
# Security settings
|
||||
SECURE_CONTENT_TYPE_NOSNIFF = False
|
||||
SECURE_BROWSER_XSS_FILTER = False
|
||||
SESSION_COOKIE_SECURE = False
|
||||
CSRF_COOKIE_SECURE = False
|
||||
CSRF_COOKIE_HTTPONLY = False
|
||||
X_FRAME_OPTIONS = 'DENY'
|
||||
SESSION_COOKIE_AGE = 60 * 60 * 3
|
Reference in New Issue
Block a user