1 # Django settings for ais project.
3 from __future__ import division
4 from ais.ntools import read_cfg
5 from ais.db import DATABASE_CONFIG_FILE
11 # ('Your Name', 'your_email@domain.com'),
16 DATABASE_ENGINE = 'postgresql_psycopg2' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
17 __cfg__ = read_cfg(DATABASE_CONFIG_FILE)
18 DATABASE_NAME = __cfg__['dbname'] # Or path to database file if using sqlite3.
19 DATABASE_USER = __cfg__.get('user', '') # Not used with sqlite3.
20 DATABASE_PASSWORD = __cfg__.get('password', '') # Not used with sqlite3.
21 DATABASE_HOST = __cfg__.get('host', '') # Set to empty string for localhost. Not used with sqlite3.
22 DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
24 # Local time zone for this installation. Choices can be found here:
25 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
26 # although not all choices may be available on all operating systems.
27 # If running in a Windows environment this must be set to the same as your
31 # Language code for this installation. All choices can be found here:
32 # http://www.i18nguy.com/unicode/language-identifiers.html
33 LANGUAGE_CODE = 'en-gb'
37 # If you set this to False, Django will make some optimizations so as not
38 # to load the internationalization machinery.
41 # Absolute path to the directory that holds media.
42 # Example: "/home/media/media.lawrence.com/"
43 MEDIA_ROOT = '/usr/lib/ais/www/'
45 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
46 # trailing slash if there is a path component (optional in other cases).
47 # Examples: "http://media.lawrence.com", "http://example.com/media/"
50 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
52 # Examples: "http://foo.com/media/", "/media/".
53 ADMIN_MEDIA_PREFIX = '/media/'
55 # Make this unique, and don't share it with anybody.
56 SECRET_KEY = 'o^hhivzd2!1s73#c4_zlvz#v+i4kyzdr9+#vw824is!rf8&mgp'
58 # List of callables that know how to import templates from various sources.
60 'django.template.loaders.filesystem.load_template_source',
61 'django.template.loaders.app_directories.load_template_source',
62 # 'django.template.loaders.eggs.load_template_source',
65 MIDDLEWARE_CLASSES = (
66 # 'django.middleware.common.CommonMiddleware',
67 # 'django.contrib.sessions.middleware.SessionMiddleware',
68 # 'django.contrib.auth.middleware.AuthenticationMiddleware',
71 ROOT_URLCONF = 'ais.djais.urls'
74 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
75 # Always use forward slashes, even on Windows.
76 # Don't forget to use absolute paths, not relative paths.
77 '/usr/lib/ais/html_templates',
81 # 'django.contrib.auth',
82 # 'django.contrib.contenttypes',
83 # 'django.contrib.sessions',
84 # 'django.contrib.sites',
88 TEMPLATE_CONTEXT_PROCESSORS = (
89 "django.contrib.auth.context_processors.auth",
90 "django.core.context_processors.debug",
91 "django.core.context_processors.i18n",
92 "django.core.context_processors.media",
93 "django.core.context_processors.request", # Added by Nirgal
94 "django.contrib.messages.context_processors.messages",
97 AIS_BASE_URL='https://ais.nirgal.com'