black WikiENS/settings/

This commit is contained in:
Martin Pépin 2019-12-24 17:07:10 +01:00
parent 253444d345
commit 0e963a5cc4
No known key found for this signature in database
GPG key ID: E7520278B1774448
3 changed files with 7 additions and 9 deletions

View file

@ -35,9 +35,7 @@ DBPASSWD = import_secret("DBPASSWD")
SERVER_EMAIL = "wiki@www.eleves.ens.fr" SERVER_EMAIL = "wiki@www.eleves.ens.fr"
BASE_DIR = os.path.dirname( BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
)
INSTALLED_APPS = [ INSTALLED_APPS = [
@ -176,9 +174,9 @@ ACCOUNT_HOME_URL = HOME_URL
ACCOUNT_USER_DISPLAY = _user_display ACCOUNT_USER_DISPLAY = _user_display
SOCIALACCOUNT_PROVIDERS = { SOCIALACCOUNT_PROVIDERS = {
'clipper': { "clipper": {
'MESSAGE_SUGGEST_LOGOUT_ON_LOGOUT': True, "MESSAGE_SUGGEST_LOGOUT_ON_LOGOUT": True,
'MESSAGE_SUGGEST_LOGOUT_ON_LOGOUT_LEVEL': messages.INFO, "MESSAGE_SUGGEST_LOGOUT_ON_LOGOUT_LEVEL": messages.INFO,
}, },
} }
@ -215,7 +213,7 @@ WIKI_REVISIONS_PER_MINUTES = 180
# This is needed for django-allauth-cas, see # This is needed for django-allauth-cas, see
# https://blog.ubuntu.com/2015/08/18/django-behind-a-proxy-fixing-absolute-urls # https://blog.ubuntu.com/2015/08/18/django-behind-a-proxy-fixing-absolute-urls
USE_X_FORWARDED_HOST = True USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
# Use sign up, login, logout, profile settings views of allauth. # Use sign up, login, logout, profile settings views of allauth.
WIKI_ACCOUNT_HANDLING = False WIKI_ACCOUNT_HANDLING = False

View file

@ -11,6 +11,6 @@ DEBUG = True
DATABASES = { DATABASES = {
"default": { "default": {
"ENGINE": "django.db.backends.sqlite3", "ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(BASE_DIR, "db.sqlite3") "NAME": os.path.join(BASE_DIR, "db.sqlite3"),
} }
} }

View file

@ -1,4 +1,4 @@
SECRET_KEY = '_u5q4-^1qgkqg=i5o5ha*xkd@82#l$e+%m)$v+4y#t-5!g-%g2' SECRET_KEY = "_u5q4-^1qgkqg=i5o5ha*xkd@82#l$e+%m)$v+4y#t-5!g-%g2"
ADMINS = None ADMINS = None
EMAIL_HOST = "localhost" EMAIL_HOST = "localhost"