diff --git a/.gitignore b/.gitignore index f4a55e2..20e932c 100644 --- a/.gitignore +++ b/.gitignore @@ -111,4 +111,5 @@ migrations/ *.sqlite3 .sass-cache /static/ -settings.py \ No newline at end of file +settings.py +secrets.py diff --git a/experiENS/secrets.py b/experiENS/secrets.py deleted file mode 100644 index f03fb95..0000000 --- a/experiENS/secrets.py +++ /dev/null @@ -1 +0,0 @@ -SECRET_KEY = 'toto' diff --git a/experiENS/settings_base.py b/experiENS/settings_base.py index 04822c3..cac52f3 100644 --- a/experiENS/settings_base.py +++ b/experiENS/settings_base.py @@ -102,6 +102,13 @@ AUTHENTICATION_BACKENDS = ( 'experiENS.auth.ENSCASBackend', ) -CAS_SERVER_URL = "https://cas.eleves.ens.fr/" +CAS_SERVER_URL = "https://cas.eleves.ens.fr/" #SPI CAS +CAS_VERIFY_URL = "https://cas.eleves.ens.fr/" +CAS_IGNORE_REFERER = True +CAS_REDIRECT_URL = reverse_lazy('avisstage:perso') +CAS_EMAIL_FORMAT = "%s@clipper.ens.fr" +CAS_FORCE_CHANGE_USERNAME_CASE = "lower" +CAS_VERSION = 'CAS_2_SAML_1_0' LOGIN_URL = reverse_lazy('login') +LOGOUT_URL = reverse_lazy('logout') diff --git a/experiENS/settings_prod.py b/experiENS/settings_prod.py new file mode 100644 index 0000000..fe566a1 --- /dev/null +++ b/experiENS/settings_prod.py @@ -0,0 +1,45 @@ +from settings_base import * + +from secrets import SECRET_KEY + +import os, sys +from django.core.urlresolvers import reverse_lazy + +PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) +BASE_DIR = os.path.dirname(PROJECT_DIR) + +DEBUG = False + +ALLOWED_HOSTS = ["www.eleves.ens.fr"] + +ADMINS = ( + ('Robin Champenois', 'champeno@clipper.ens.fr'), + ) + +ADMIN_LOGINS = [ + "champeno", +] + +SERVER_EMAIL = "experiens@www.eleves.ens.fr" + +ROOT_URL = "/experiens/" + +WSGI_APPLICATION = 'experiENS.wsgi.application' + +DATABASES = { + 'default': { + 'ENGINE': 'django.contrib.gis.db.backends.postgis', + 'NAME': 'experiens', + 'USER': 'experiens', + 'PASSWORD': '', + 'HOST': '', + 'PORT': '5432', + } +} + +STATIC_URL = ROOT_URL + 'static/' +MEDIA_URL = ROOT_URL + 'media/' + +STATIC_ROOT = os.path.join(BASE_DIR, '/static/') + +EMAIL_HOST = "nef.ens.fr"