| author | cavaliet |
| Fri, 05 Jul 2013 16:54:13 +0200 | |
| changeset 227 | 9b88517060d7 |
| parent 105 | 2b004344ebf2 |
| child 229 | 8a02a23cdaba |
| permissions | -rw-r--r-- |
| 4 | 1 |
# Django settings for egonomy project. |
2 |
||
3 |
DEBUG = True |
|
4 |
TEMPLATE_DEBUG = DEBUG |
|
5 |
||
6 |
ADMINS = ( |
|
7 |
# ('Your Name', 'your_email@example.com'), |
|
8 |
) |
|
9 |
||
10 |
MANAGERS = ADMINS |
|
11 |
||
12 |
DATABASES = { |
|
13 |
'default': { |
|
14 |
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
|
15 |
'NAME': '', # Or path to database file if using sqlite3. |
|
16 |
# The following settings are not used with sqlite3: |
|
17 |
'USER': '', |
|
18 |
'PASSWORD': '', |
|
19 |
'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. |
|
20 |
'PORT': '', # Set to empty string for default. |
|
21 |
} |
|
22 |
} |
|
23 |
||
| 36 | 24 |
HAYSTACK_CONNECTIONS = { |
25 |
'default': { |
|
26 |
'ENGINE': '', |
|
27 |
'URL': '', |
|
28 |
'INDEX_NAME': '', |
|
29 |
}, |
|
30 |
} |
|
31 |
||
| 4 | 32 |
# Local time zone for this installation. Choices can be found here: |
33 |
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
|
34 |
# although not all choices may be available on all operating systems. |
|
35 |
# In a Windows environment this must be set to your system time zone. |
|
36 |
TIME_ZONE = 'America/Chicago' |
|
37 |
||
38 |
# Language code for this installation. All choices can be found here: |
|
39 |
# http://www.i18nguy.com/unicode/language-identifiers.html |
|
40 |
LANGUAGE_CODE = 'en-us' |
|
41 |
||
42 |
SITE_ID = 1 |
|
43 |
||
44 |
# If you set this to False, Django will make some optimizations so as not |
|
45 |
# to load the internationalization machinery. |
|
46 |
USE_I18N = True |
|
47 |
||
48 |
# If you set this to False, Django will not format dates, numbers and |
|
49 |
# calendars according to the current locale. |
|
50 |
USE_L10N = True |
|
51 |
||
52 |
# If you set this to False, Django will not use timezone-aware datetimes. |
|
53 |
USE_TZ = True |
|
54 |
||
55 |
# Absolute filesystem path to the directory that will hold user-uploaded files. |
|
56 |
# Example: "/var/www/example.com/media/" |
|
57 |
MEDIA_ROOT = '' |
|
58 |
||
59 |
# URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
60 |
# trailing slash. |
|
61 |
# Examples: "http://example.com/media/", "http://media.example.com/" |
|
62 |
MEDIA_URL = '' |
|
63 |
||
64 |
# Absolute path to the directory static files should be collected to. |
|
65 |
# Don't put anything in this directory yourself; store your static files |
|
66 |
# in apps' "static/" subdirectories and in STATICFILES_DIRS. |
|
67 |
# Example: "/var/www/example.com/static/" |
|
68 |
STATIC_ROOT = '' |
|
69 |
||
70 |
# URL prefix for static files. |
|
71 |
# Example: "http://example.com/static/", "http://static.example.com/" |
|
72 |
STATIC_URL = '/static/' |
|
73 |
||
74 |
# Additional locations of static files |
|
75 |
STATICFILES_DIRS = ( |
|
76 |
# Put strings here, like "/home/html/static" or "C:/www/django/static". |
|
77 |
# Always use forward slashes, even on Windows. |
|
78 |
# Don't forget to use absolute paths, not relative paths. |
|
79 |
) |
|
80 |
||
81 |
# List of finder classes that know how to find static files in |
|
82 |
# various locations. |
|
83 |
STATICFILES_FINDERS = ( |
|
84 |
'django.contrib.staticfiles.finders.FileSystemFinder', |
|
85 |
'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|
86 |
# 'django.contrib.staticfiles.finders.DefaultStorageFinder', |
|
87 |
) |
|
88 |
||
89 |
# Make this unique, and don't share it with anybody. |
|
90 |
SECRET_KEY = 'z0^ex@s2*e@x00x1gq83c+(6xjxyi5*gfadu)+1mijvr%4g!@$' |
|
91 |
||
92 |
# List of callables that know how to import templates from various sources. |
|
93 |
TEMPLATE_LOADERS = ( |
|
94 |
'django.template.loaders.filesystem.Loader', |
|
95 |
'django.template.loaders.app_directories.Loader', |
|
96 |
# 'django.template.loaders.eggs.Loader', |
|
97 |
) |
|
98 |
||
99 |
MIDDLEWARE_CLASSES = ( |
|
100 |
'django.middleware.common.CommonMiddleware', |
|
101 |
'django.contrib.sessions.middleware.SessionMiddleware', |
|
102 |
'django.middleware.csrf.CsrfViewMiddleware', |
|
103 |
'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
104 |
'django.contrib.messages.middleware.MessageMiddleware', |
|
105 |
# Uncomment the next line for simple clickjacking protection: |
|
106 |
# 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
107 |
) |
|
108 |
||
|
105
2b004344ebf2
add version number in template. Upgrade version number to v0.3.2.
cavaliet
parents:
38
diff
changeset
|
109 |
TEMPLATE_CONTEXT_PROCESSORS = ( |
|
2b004344ebf2
add version number in template. Upgrade version number to v0.3.2.
cavaliet
parents:
38
diff
changeset
|
110 |
"django.contrib.auth.context_processors.auth", |
|
2b004344ebf2
add version number in template. Upgrade version number to v0.3.2.
cavaliet
parents:
38
diff
changeset
|
111 |
"django.core.context_processors.debug", |
|
2b004344ebf2
add version number in template. Upgrade version number to v0.3.2.
cavaliet
parents:
38
diff
changeset
|
112 |
"django.core.context_processors.i18n", |
|
2b004344ebf2
add version number in template. Upgrade version number to v0.3.2.
cavaliet
parents:
38
diff
changeset
|
113 |
"django.core.context_processors.media", |
|
2b004344ebf2
add version number in template. Upgrade version number to v0.3.2.
cavaliet
parents:
38
diff
changeset
|
114 |
"django.core.context_processors.static", |
|
2b004344ebf2
add version number in template. Upgrade version number to v0.3.2.
cavaliet
parents:
38
diff
changeset
|
115 |
"django.core.context_processors.tz", |
|
2b004344ebf2
add version number in template. Upgrade version number to v0.3.2.
cavaliet
parents:
38
diff
changeset
|
116 |
"django.contrib.messages.context_processors.messages", |
|
2b004344ebf2
add version number in template. Upgrade version number to v0.3.2.
cavaliet
parents:
38
diff
changeset
|
117 |
"egonomy.utils.context_processors.egonomy_context", |
|
2b004344ebf2
add version number in template. Upgrade version number to v0.3.2.
cavaliet
parents:
38
diff
changeset
|
118 |
) |
|
2b004344ebf2
add version number in template. Upgrade version number to v0.3.2.
cavaliet
parents:
38
diff
changeset
|
119 |
|
| 4 | 120 |
ROOT_URLCONF = 'egonomy.urls' |
121 |
||
122 |
# Python dotted path to the WSGI application used by Django's runserver. |
|
123 |
WSGI_APPLICATION = 'egonomy.wsgi.application' |
|
124 |
||
125 |
TEMPLATE_DIRS = ( |
|
126 |
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
|
127 |
# Always use forward slashes, even on Windows. |
|
128 |
# Don't forget to use absolute paths, not relative paths. |
|
129 |
) |
|
130 |
||
131 |
INSTALLED_APPS = ( |
|
132 |
'django.contrib.auth', |
|
133 |
'django.contrib.contenttypes', |
|
134 |
'django.contrib.sessions', |
|
135 |
'django.contrib.sites', |
|
136 |
'django.contrib.messages', |
|
137 |
'django.contrib.staticfiles', |
|
| 9 | 138 |
'django.contrib.admin', |
139 |
'django.contrib.admindocs', |
|
| 21 | 140 |
'django_extensions', |
141 |
'south', |
|
| 17 | 142 |
'sorl.thumbnail', |
| 36 | 143 |
'haystack', |
| 9 | 144 |
'egonomy', |
| 4 | 145 |
) |
146 |
||
| 13 | 147 |
ugettext = lambda s: s |
148 |
LANGUAGES = ( |
|
149 |
('fr', ugettext('French')), |
|
150 |
('en', ugettext('English')), |
|
151 |
) |
|
152 |
||
| 4 | 153 |
# A sample logging configuration. The only tangible logging |
154 |
# performed by this configuration is to send an email to |
|
155 |
# the site admins on every HTTP 500 error when DEBUG=False. |
|
156 |
# See http://docs.djangoproject.com/en/dev/topics/logging for |
|
157 |
# more details on how to customize your logging configuration. |
|
158 |
LOGGING = { |
|
159 |
'version': 1, |
|
160 |
'disable_existing_loggers': False, |
|
161 |
'filters': { |
|
162 |
'require_debug_false': { |
|
163 |
'()': 'django.utils.log.RequireDebugFalse' |
|
164 |
} |
|
165 |
}, |
|
166 |
'handlers': { |
|
167 |
'mail_admins': { |
|
168 |
'level': 'ERROR', |
|
169 |
'filters': ['require_debug_false'], |
|
170 |
'class': 'django.utils.log.AdminEmailHandler' |
|
171 |
} |
|
172 |
}, |
|
173 |
'loggers': { |
|
174 |
'django.request': { |
|
175 |
'handlers': ['mail_admins'], |
|
176 |
'level': 'ERROR', |
|
177 |
'propagate': True, |
|
178 |
}, |
|
179 |
} |
|
180 |
} |
|
181 |
||
| 36 | 182 |
|
183 |
HAYSTACK_SIGNAL_PROCESSOR = 'egonomy.search_indexes.EgonomySignalProcessor' |
|
184 |
||
| 21 | 185 |
from .config import * #@UnusedWildImport |
| 28 | 186 |
|
|
33
71028c5eb7eb
Correct settings. Add SRC_BASE_URL that points to the django site root
ymh <ymh.work@gmail.com>
parents:
28
diff
changeset
|
187 |
if not "SRC_BASE_URL" in locals(): |
|
71028c5eb7eb
Correct settings. Add SRC_BASE_URL that points to the django site root
ymh <ymh.work@gmail.com>
parents:
28
diff
changeset
|
188 |
SRC_BASE_URL = BASE_URL + __name__.split('.')[0] + '/' |
| 28 | 189 |
|
190 |
if not "LOGIN_URL" in locals(): |
|
|
33
71028c5eb7eb
Correct settings. Add SRC_BASE_URL that points to the django site root
ymh <ymh.work@gmail.com>
parents:
28
diff
changeset
|
191 |
LOGIN_URL = SRC_BASE_URL + 'login/' |
|
71028c5eb7eb
Correct settings. Add SRC_BASE_URL that points to the django site root
ymh <ymh.work@gmail.com>
parents:
28
diff
changeset
|
192 |
|
| 36 | 193 |
if not "IMAGES_PER_PAGE" in locals(): |
194 |
IMAGES_PER_PAGE = 32 |
|
| 38 | 195 |
|
196 |
HAYSTACK_ITERATOR_LOAD_PER_QUERY = IMAGES_PER_PAGE |
|
197 |
||
198 |