settings.py 4.48 KB
Newer Older
1
# Django settings for Nuages
2

christophe siraut's avatar
christophe siraut committed
3 4 5
import os

# Turn off for production
Christophe Siraut's avatar
Christophe Siraut committed
6
DEBUG = True
7 8
TEMPLATE_DEBUG = DEBUG

9
PROJECT_DIR = os.path.normpath(os.path.dirname(os.path.dirname(__file__)))
10 11 12 13
ADMINS = (
    # ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
chris's avatar
chris committed
14
DEFAULT_FROM_EMAIL = 'nuages@domainepublic.net'
15 16

LOGIN_REDIRECT_URL = '/'
17

Christophe Siraut's avatar
Christophe Siraut committed
18 19 20 21 22 23 24 25 26 27
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': os.path.join(PROJECT_DIR, 'nuages.sqlite'),    # Or path to database file if using sqlite3.
        'USER': '',                      # Not used with sqlite3.
        'PASSWORD': '',                  # Not used with sqlite3.
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
    },
}
28

Christophe Siraut's avatar
Christophe Siraut committed
29 30
ACCOUNT_ACTIVATION_DAYS = 7 # One-week activation window

31 32 33 34 35
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
christophe siraut's avatar
christophe siraut committed
36
TIME_ZONE = 'Europe/Brussels'
37 38 39 40 41

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'

42 43 44
LANGUAGES = (
  ('fr', 'Francais'),
  ('en', 'English'),
45
  ('nl', 'Nederlands'),
Christophe Siraut's avatar
Cleanup  
Christophe Siraut committed
46
  ('ca', 'Catalan')
47 48
)

Christophe Siraut's avatar
Christophe Siraut committed
49 50
LOCALE_PATHS = ((os.path.join(PROJECT_DIR, 'locale'),))

51 52 53 54 55 56
SITE_ID = 1

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

Christophe Siraut's avatar
Christophe Siraut committed
57 58 59
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = ''
60 61 62

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
Christophe Siraut's avatar
Christophe Siraut committed
63 64 65 66 67 68 69
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = ''

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
70
STATIC_ROOT = os.path.join(PROJECT_DIR, 'staticroot')
Christophe Siraut's avatar
Christophe Siraut committed
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'

# Additional locations of static files
STATICFILES_DIRS = (
    # Put strings here, like "/home/html/static" or "C:/www/django/static".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    os.path.join(PROJECT_DIR, 'static'),
)

# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
#    'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
91 92

# Make this unique, and don't share it with anybody.
93
SECRET_KEY = '3qm&@6264-=st16)7_xa*ds+31e0mqqs@+*!ud7gzt$tq!b^qn'
94 95 96

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
Christophe Siraut's avatar
Christophe Siraut committed
97 98
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
99 100 101 102 103
#     'django.template.loaders.eggs.load_template_source',
)

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
104
    'django.middleware.locale.LocaleMiddleware',
105 106
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
107
    'django.contrib.auth.middleware.AuthenticationMiddleware',
Christophe Siraut's avatar
Christophe Siraut committed
108 109
    'django.contrib.messages.middleware.MessageMiddleware',
    #'request.middleware.RequestMiddleware',
110 111
)

112
ROOT_URLCONF = 'nuages.urls'
113 114 115 116 117

TEMPLATE_DIRS = (
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
christophe siraut's avatar
christophe siraut committed
118
    os.path.join(PROJECT_DIR, 'templates'),
119 120 121 122 123 124 125
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
Christophe Siraut's avatar
Christophe Siraut committed
126 127
    'django.contrib.messages',
    'django.contrib.staticfiles',
chris's avatar
chris committed
128 129
    'django.contrib.admin',
    'django.contrib.admindocs',
Christophe Siraut's avatar
Christophe Siraut committed
130
    'registration',
131
    'account',
132
    'poll',
133
    'meetingpoll',
134
)
135 136 137 138 139

try:
   from local_settings import *
except ImportError, e:
   pass
140