2020-02-18 20:30:26 +00:00
|
|
|
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2020-01-27 20:49:02 +00:00
|
|
|
########################
|
|
|
|
# Development Settings #
|
|
|
|
########################
|
|
|
|
# For local dev on your machine:
|
2020-08-09 16:34:51 +00:00
|
|
|
# - debug by default
|
|
|
|
# - use sqlite as a db engine by default
|
2020-01-27 20:49:02 +00:00
|
|
|
# - standalone mail server
|
2020-08-09 16:34:51 +00:00
|
|
|
# - and more...
|
2020-01-27 20:49:02 +00:00
|
|
|
|
2020-03-07 21:28:59 +00:00
|
|
|
import os
|
|
|
|
|
2020-08-09 17:36:11 +00:00
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
|
|
|
2020-08-09 16:34:51 +00:00
|
|
|
if os.getenv("DJANGO_DEV_STORE_METHOD", "sqlite") != "postgresql":
|
|
|
|
# Use an SQLite database
|
2020-03-11 14:54:12 +00:00
|
|
|
DATABASES = {
|
|
|
|
'default': {
|
|
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
|
|
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
|
|
|
}
|
2020-01-27 20:49:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Break it, fix it!
|
|
|
|
DEBUG = True
|
|
|
|
|
2020-08-09 16:34:51 +00:00
|
|
|
# Allow access from all hostnames
|
2020-02-03 10:50:42 +00:00
|
|
|
ALLOWED_HOSTS = ['*']
|
2020-01-27 20:49:02 +00:00
|
|
|
|
2020-08-09 16:34:51 +00:00
|
|
|
# Drop emails to server console
|
2020-01-27 20:49:02 +00:00
|
|
|
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
2020-05-08 13:59:31 +00:00
|
|
|
SERVER_EMAIL = 'notekfet@localhost'
|
2020-01-27 20:49:02 +00:00
|
|
|
|
2020-08-09 16:34:51 +00:00
|
|
|
# Disable some security settings
|
2020-01-27 20:49:02 +00:00
|
|
|
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
|