aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2011-11-15 16:43:18 +0100
committerCorentin Chary <corentincj@iksaif.net>2011-11-15 16:43:18 +0100
commita1bdde6a95fa598581bdc1b1dbaf58ffaf16cb33 (patch)
tree3f6cea48e8761acaf96e9a8dfb702ce2a7ae7970
parenteuscan: update TODO (diff)
downloadeuscan-a1bdde6a95fa598581bdc1b1dbaf58ffaf16cb33.tar.gz
euscan-a1bdde6a95fa598581bdc1b1dbaf58ffaf16cb33.tar.bz2
euscan-a1bdde6a95fa598581bdc1b1dbaf58ffaf16cb33.zip
euscanwww: import local_settings and add postgres example
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
-rw-r--r--euscanwww/settings.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/euscanwww/settings.py b/euscanwww/settings.py
index 4ce10fb..01e56e9 100644
--- a/euscanwww/settings.py
+++ b/euscanwww/settings.py
@@ -13,6 +13,7 @@ MANAGERS = ADMINS
"""
# MySQL Example:
+ 'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'euscan',
'USER': 'euscan',
@@ -22,6 +23,17 @@ MANAGERS = ADMINS
'OPTIONS': {
'init_command': 'SET storage_engine=INNODB',
}
+ },
+
+# PostGreSQL Example:
+ 'default': {
+ 'ENGINE': 'django.db.backends.postgresql_psycopg2',
+ 'NAME': 'euscan',
+ 'USER': 'euscan',
+ 'PASSWORD': '',
+ 'HOST': 'localhost',
+ 'PORT': '',
+ },
"""
DATABASES = {
@@ -78,7 +90,7 @@ MEDIA_URL = '/media/'
ADMIN_MEDIA_PREFIX = '/admin-media/'
# Make this unique, and don't share it with anybody.
-SECRET_KEY = '7b7ea2ca45021661d623122e9e14c2b529f23054'
+SECRET_KEY = '00000000000000000000000000000000000000000000000000'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
@@ -122,3 +134,12 @@ INSTALLED_APPS = (
# 'django.contrib.admindocs',
)
+try:
+ from local_settings import *
+except ImportError, ex:
+ import sys
+ sys.stderr.write(\
+ ("settings.py: error importing local settings file:\n" + \
+ "\t%s\n" + \
+ "Do you have a local_settings.py module?\n") % str(ex))
+ raise