1 | # Django settings for sampleproject project.
|
---|
2 | from os.path import dirname, join
|
---|
3 | _dir = dirname(__file__)
|
---|
4 |
|
---|
5 | LIB_PATH = join(_dir,'..')
|
---|
6 | import sys
|
---|
7 | sys.path.append(LIB_PATH)
|
---|
8 |
|
---|
9 | DEBUG = True
|
---|
10 | TEMPLATE_DEBUG = DEBUG
|
---|
11 |
|
---|
12 | ADMINS = (
|
---|
13 | # ('Your Name', 'your_email@domain.com'),
|
---|
14 | )
|
---|
15 |
|
---|
16 | MANAGERS = ADMINS
|
---|
17 |
|
---|
18 | DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
|
---|
19 | DATABASE_NAME = join(_dir,'data.sqlite') # Or path to database file if using sqlite3.
|
---|
20 | DATABASE_USER = '' # Not used with sqlite3.
|
---|
21 | DATABASE_PASSWORD = '' # Not used with sqlite3.
|
---|
22 | DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
|
---|
23 | DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
|
---|
24 |
|
---|
25 | # Local time zone for this installation. Choices can be found here:
|
---|
26 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
---|
27 | # although not all choices may be available on all operating systems.
|
---|
28 | # If running in a Windows environment this must be set to the same as your
|
---|
29 | # system time zone.
|
---|
30 | TIME_ZONE = 'America/Chicago'
|
---|
31 |
|
---|
32 | # Language code for this installation. All choices can be found here:
|
---|
33 | # http://www.i18nguy.com/unicode/language-identifiers.html
|
---|
34 | LANGUAGE_CODE = 'en-us'
|
---|
35 |
|
---|
36 | SITE_ID = 1
|
---|
37 |
|
---|
38 | # If you set this to False, Django will make some optimizations so as not
|
---|
39 | # to load the internationalization machinery.
|
---|
40 | USE_I18N = True
|
---|
41 |
|
---|
42 | # Absolute path to the directory that holds media.
|
---|
43 | # Example: "/home/media/media.lawrence.com/"
|
---|
44 | MEDIA_ROOT = join(_dir, 'static/')
|
---|
45 |
|
---|
46 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
---|
47 | # trailing slash if there is a path component (optional in other cases).
|
---|
48 | # Examples: "http://media.lawrence.com", "http://example.com/media/"
|
---|
49 | MEDIA_URL = '/static/'
|
---|
50 |
|
---|
51 | # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
---|
52 | # trailing slash.
|
---|
53 | # Examples: "http://foo.com/media/", "/media/".
|
---|
54 | ADMIN_MEDIA_PREFIX = '/media/'
|
---|
55 |
|
---|
56 | # Make this unique, and don't share it with anybody.
|
---|
57 | SECRET_KEY = 'ih3^*u=ndnu+nbuv&0)zbd5m2gt%5alzu9*%s!bze2w&r426(6'
|
---|
58 |
|
---|
59 | # List of callables that know how to import templates from various sources.
|
---|
60 | TEMPLATE_LOADERS = (
|
---|
61 | 'sampleproject.flags.loaders.filesystem.load_template_source',
|
---|
62 | 'sampleproject.flags.loaders.app_directories.load_template_source',
|
---|
63 | 'django.template.loaders.filesystem.load_template_source',
|
---|
64 | 'django.template.loaders.app_directories.load_template_source',
|
---|
65 | # 'django.template.loaders.eggs.load_template_source',
|
---|
66 | )
|
---|
67 |
|
---|
68 | MIDDLEWARE_CLASSES = (
|
---|
69 | 'django.middleware.common.CommonMiddleware',
|
---|
70 | 'django.contrib.sessions.middleware.SessionMiddleware',
|
---|
71 | "django.middleware.csrf.CsrfViewMiddleware",
|
---|
72 | 'django.contrib.auth.middleware.AuthenticationMiddleware',
|
---|
73 | 'django.middleware.locale.LocaleMiddleware',
|
---|
74 | 'django.middleware.doc.XViewMiddleware',
|
---|
75 | 'django.middleware.csrf.CsrfResponseMiddleware',
|
---|
76 | )
|
---|
77 |
|
---|
78 | ROOT_URLCONF = 'sampleproject.urls'
|
---|
79 |
|
---|
80 | TEMPLATE_DIRS = (
|
---|
81 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
---|
82 | # Always use forward slashes, even on Windows.
|
---|
83 | # Don't forget to use absolute paths, not relative paths.
|
---|
84 | join(_dir,'..', 'goflow', 'apptools', 'templates'),
|
---|
85 | join(_dir,'..', 'goflow', 'runtime', 'templates')
|
---|
86 | )
|
---|
87 |
|
---|
88 | TEMPLATE_CONTEXT_PROCESSORS = [
|
---|
89 | "django.core.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",
|
---|
94 | "django.contrib.messages.context_processors.messages",
|
---|
95 | ]
|
---|
96 |
|
---|
97 | INSTALLED_APPS = (
|
---|
98 | 'django.contrib.auth',
|
---|
99 | 'django.contrib.contenttypes',
|
---|
100 | 'django.contrib.sessions',
|
---|
101 | 'django.contrib.sites',
|
---|
102 | 'django.contrib.admin',
|
---|
103 | 'django.contrib.admindocs',
|
---|
104 | 'goflow.workflow',
|
---|
105 | 'goflow.runtime',
|
---|
106 | 'goflow.apptools',
|
---|
107 | 'sampleproject.sampleapp',
|
---|
108 | 'sampleproject.flags',
|
---|
109 | )
|
---|
110 |
|
---|
111 | LOGIN_URL = '/accounts/login'
|
---|
112 |
|
---|
113 | # user profile model
|
---|
114 | AUTH_PROFILE_MODULE = 'workflow.userprofile'
|
---|
115 |
|
---|
116 | # mail notification
|
---|
117 | DEFAULT_FROM_EMAIL = 'sample@project.com'
|
---|
118 | EMAIL_HOST = 'localhost'
|
---|
119 |
|
---|
120 | # user that executes auto processes
|
---|
121 | WF_USER_AUTO = 'auto'
|
---|
122 | # used to build application url like: http://[web_host]/[WF_APPS_PREFIX]/[application]
|
---|
123 | WF_APPS_PREFIX = '/sampleapp'
|
---|
124 | # used to find push functions
|
---|
125 | WF_PUSH_APPS_PREFIX = 'sampleproject.sampleapp.pushapps'
|
---|
126 |
|
---|
127 | # test users for fast switch (with DEBUG=TRUE only)
|
---|
128 | TEST_USERS = (('admin','admin'), ('user1','user1'),
|
---|
129 | ('user2','user2'), ('userg1','userg1'))
|
---|
130 |
|
---|
131 | # the FLAGS_I18N_PREFIX parameter must match urls.py item:
|
---|
132 | # urls.py > (r'^PREFIX/i18n/', include('django.conf.urls.i18n')),
|
---|
133 | # settings.py > FLAGS_I18N_PREFIX = '/PREFIX/i18n/'
|
---|
134 | FLAGS_I18N_PREFIX = '/lang/i18n/'
|
---|
135 | # flags served by local server
|
---|
136 | FLAGS_URL = MEDIA_URL + "flags/"
|
---|
137 | # flags served by net server
|
---|
138 | #FLAGS_URL = 'http://djangodev.free.fr/flags/'
|
---|
139 |
|
---|
140 | # languages
|
---|
141 | ugettext = lambda s: s
|
---|
142 | LANGUAGES = (
|
---|
143 | ('ar', ugettext('Arabic')),
|
---|
144 | ('fr', ugettext('French')),
|
---|
145 | ('en', ugettext('English')),
|
---|
146 | ('es', ugettext('Spanish')),
|
---|
147 | ('de', ugettext('German')),
|
---|
148 | ('pl', ugettext('Polish')),
|
---|
149 | )
|
---|
150 |
|
---|
151 |
|
---|