From fa854a83ee036bb37941b1f7024f5ba3fb962316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Tue, 21 Jun 2016 00:45:21 +0200 Subject: [PATCH] Retire les settings du git MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Propose un fichier d'exemple, à adapter à la conf du serveur --- .gitignore | 1 + .../{settings.py => settings-example.py} | 30 +++++++++++-------- 2 files changed, 18 insertions(+), 13 deletions(-) rename Ernestophone/{settings.py => settings-example.py} (84%) diff --git a/.gitignore b/.gitignore index 24f7248..84f82a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .pyc media/ db.sqlite3 +Ernestophone/settings.py diff --git a/Ernestophone/settings.py b/Ernestophone/settings-example.py similarity index 84% rename from Ernestophone/settings.py rename to Ernestophone/settings-example.py index 8b14c29..a403cec 100644 --- a/Ernestophone/settings.py +++ b/Ernestophone/settings-example.py @@ -10,24 +10,27 @@ https://docs.djangoproject.com/en/1.7/ref/settings/ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os -BASE_DIR = os.path.dirname(os.path.dirname(__file__)) -MEDIA_ROOT = 'media/' -MEDIA_URL = 'media/' -EMAIL_HOST='clipper.ens.fr' -EMAIL_PORT= 25 +BASE_DIR = os.path.dirname(os.path.dirname(__file__)) + +MEDIA_ROOT = os.path.join(BASE_DIR, 'media') +MEDIA_URL = '/media/' + +STATIC_ROOT = os.path.join(BASE_DIR, 'static') +STATIC_URL = '/static/' + # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '+9czchiqs@imvckb6e7-msqdu!e^c9b7n1&+*qgo%p7ackwu7$' +SECRET_KEY = 'ax0|dG^AhtYfXPXgu3*e|k3l^yKpbK;$~(_%q/5C!H9yHA(Z(2' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True TEMPLATE_DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ['*'] # Application definition @@ -43,6 +46,7 @@ INSTALLED_APPS = ( 'partitions', 'calendrier', 'propositions', + 'pads', ) MIDDLEWARE_CLASSES = ( @@ -87,17 +91,17 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.7/howto/static-files/ -STATIC_URL = '/static/' - STATICFILES_DIRS = ( - 'static', - 'media/partitions', + os.path.join(BASE_DIR, 'static'), + os.path.join(BASE_DIR, 'media/partitions'), ) TEMPLATE_DIRS = ( -'templates/gestion/', -'templates/', + os.path.join(BASE_DIR, 'templates/gestion/'), + os.path.join(BASE_DIR, 'templates/'), ) + AUTH_PROFILE_MODEL = 'gestion.ErnestoUser' LOGIN_URL = "/login" +