| author | cavaliet |
| Fri, 11 Jul 2014 16:49:14 +0200 | |
| changeset 292 | f6742c41d7a3 |
| parent 281 | bc0f26b1acc2 |
| child 295 | af29252631ac |
| permissions | -rw-r--r-- |
| 0 | 1 |
# Django settings for hdabo 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', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
|
| 21 | 15 |
'NAME': '', # Or path to database file if using sqlite3. |
16 |
'USER': '', # Not used with sqlite3. |
|
17 |
'PASSWORD': '', # Not used with sqlite3. |
|
18 |
'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
|
19 |
'PORT': '', # Set to empty string for default. Not used with sqlite3. |
|
| 0 | 20 |
} |
21 |
} |
|
22 |
||
23 |
# Local time zone for this installation. Choices can be found here: |
|
24 |
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
|
25 |
# although not all choices may be available on all operating systems. |
|
26 |
# On Unix systems, a value of None will cause Django to use the same |
|
27 |
# timezone as the operating system. |
|
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 |
# If you set this to False, Django will not format dates, numbers and |
|
43 |
# calendars according to the current locale |
|
44 |
USE_L10N = True |
|
45 |
||
46 |
# Absolute filesystem path to the directory that will hold user-uploaded files. |
|
47 |
# Example: "/home/media/media.lawrence.com/media/" |
|
48 |
MEDIA_ROOT = '' |
|
49 |
||
50 |
# URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
51 |
# trailing slash. |
|
52 |
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/" |
|
53 |
MEDIA_URL = '' |
|
54 |
||
55 |
# Absolute path to the directory static files should be collected to. |
|
56 |
# Don't put anything in this directory yourself; store your static files |
|
57 |
# in apps' "static/" subdirectories and in STATICFILES_DIRS. |
|
58 |
# Example: "/home/media/media.lawrence.com/static/" |
|
59 |
STATIC_ROOT = '' |
|
60 |
||
61 |
# URL prefix for static files. |
|
62 |
# Example: "http://media.lawrence.com/static/" |
|
|
176
ec356aa158a1
update virtualenv and remove some warnings
ymh <ymh.work@gmail.com>
parents:
105
diff
changeset
|
63 |
STATIC_URL = '/static/site' |
| 0 | 64 |
|
65 |
# Additional locations of static files |
|
66 |
STATICFILES_DIRS = ( |
|
67 |
# Put strings here, like "/home/html/static" or "C:/www/django/static". |
|
68 |
# Always use forward slashes, even on Windows. |
|
69 |
# Don't forget to use absolute paths, not relative paths. |
|
70 |
) |
|
71 |
||
72 |
# List of finder classes that know how to find static files in |
|
73 |
# various locations. |
|
74 |
STATICFILES_FINDERS = ( |
|
75 |
'django.contrib.staticfiles.finders.FileSystemFinder', |
|
76 |
'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|
77 |
# 'django.contrib.staticfiles.finders.DefaultStorageFinder', |
|
78 |
) |
|
79 |
||
80 |
# Make this unique, and don't share it with anybody. |
|
81 |
SECRET_KEY = '1anp2v#36%z(pahi5ytghik&-eg8t96)&$t)b%i=7@%=)u$pyn' |
|
82 |
||
83 |
# List of callables that know how to import templates from various sources. |
|
84 |
TEMPLATE_LOADERS = ( |
|
85 |
'django.template.loaders.filesystem.Loader', |
|
86 |
'django.template.loaders.app_directories.Loader', |
|
87 |
# 'django.template.loaders.eggs.Loader', |
|
88 |
) |
|
89 |
||
|
49
55e5f8a878ae
add the version context_processor and correct css to display it correctly
ymh <ymh.work@gmail.com>
parents:
47
diff
changeset
|
90 |
# List of processors used by RequestContext to populate the context. |
|
55e5f8a878ae
add the version context_processor and correct css to display it correctly
ymh <ymh.work@gmail.com>
parents:
47
diff
changeset
|
91 |
# Each one should be a callable that takes the request object as its |
|
55e5f8a878ae
add the version context_processor and correct css to display it correctly
ymh <ymh.work@gmail.com>
parents:
47
diff
changeset
|
92 |
# only parameter and returns a dictionary to add to the context. |
|
55e5f8a878ae
add the version context_processor and correct css to display it correctly
ymh <ymh.work@gmail.com>
parents:
47
diff
changeset
|
93 |
TEMPLATE_CONTEXT_PROCESSORS = ( |
|
55e5f8a878ae
add the version context_processor and correct css to display it correctly
ymh <ymh.work@gmail.com>
parents:
47
diff
changeset
|
94 |
'django.contrib.auth.context_processors.auth', |
|
55e5f8a878ae
add the version context_processor and correct css to display it correctly
ymh <ymh.work@gmail.com>
parents:
47
diff
changeset
|
95 |
'django.core.context_processors.debug', |
|
55e5f8a878ae
add the version context_processor and correct css to display it correctly
ymh <ymh.work@gmail.com>
parents:
47
diff
changeset
|
96 |
'django.core.context_processors.i18n', |
|
55e5f8a878ae
add the version context_processor and correct css to display it correctly
ymh <ymh.work@gmail.com>
parents:
47
diff
changeset
|
97 |
'django.core.context_processors.media', |
|
55e5f8a878ae
add the version context_processor and correct css to display it correctly
ymh <ymh.work@gmail.com>
parents:
47
diff
changeset
|
98 |
'django.core.context_processors.static', |
|
55e5f8a878ae
add the version context_processor and correct css to display it correctly
ymh <ymh.work@gmail.com>
parents:
47
diff
changeset
|
99 |
'django.contrib.messages.context_processors.messages', |
|
55e5f8a878ae
add the version context_processor and correct css to display it correctly
ymh <ymh.work@gmail.com>
parents:
47
diff
changeset
|
100 |
'hdabo.context_processors.version', |
|
55e5f8a878ae
add the version context_processor and correct css to display it correctly
ymh <ymh.work@gmail.com>
parents:
47
diff
changeset
|
101 |
) |
|
55e5f8a878ae
add the version context_processor and correct css to display it correctly
ymh <ymh.work@gmail.com>
parents:
47
diff
changeset
|
102 |
|
| 0 | 103 |
MIDDLEWARE_CLASSES = ( |
104 |
'django.middleware.common.CommonMiddleware', |
|
105 |
'django.contrib.sessions.middleware.SessionMiddleware', |
|
106 |
'django.middleware.csrf.CsrfViewMiddleware', |
|
107 |
'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
108 |
'django.contrib.messages.middleware.MessageMiddleware', |
|
|
279
177b508612f4
add, configure and correct hdalab to installed apps
cavaliet
parents:
275
diff
changeset
|
109 |
'django.middleware.locale.LocaleMiddleware', |
| 0 | 110 |
) |
111 |
||
112 |
ROOT_URLCONF = 'hdabo.urls' |
|
113 |
||
114 |
TEMPLATE_DIRS = ( |
|
115 |
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
|
116 |
# Always use forward slashes, even on Windows. |
|
117 |
# Don't forget to use absolute paths, not relative paths. |
|
118 |
) |
|
119 |
||
120 |
INSTALLED_APPS = ( |
|
| 292 | 121 |
'hdabo', |
122 |
'south', |
|
| 0 | 123 |
'django.contrib.auth', |
124 |
'django.contrib.contenttypes', |
|
125 |
'django.contrib.sessions', |
|
126 |
'django.contrib.sites', |
|
127 |
'django.contrib.messages', |
|
| 21 | 128 |
'django.contrib.staticfiles', |
| 0 | 129 |
'django.contrib.admin', |
| 2 | 130 |
'django_extensions', |
| 292 | 131 |
'registration', |
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
132 |
'haystack', |
|
279
177b508612f4
add, configure and correct hdalab to installed apps
cavaliet
parents:
275
diff
changeset
|
133 |
'hdalab', |
| 0 | 134 |
) |
135 |
||
|
279
177b508612f4
add, configure and correct hdalab to installed apps
cavaliet
parents:
275
diff
changeset
|
136 |
ugettext = lambda s:s |
|
177b508612f4
add, configure and correct hdalab to installed apps
cavaliet
parents:
275
diff
changeset
|
137 |
LANGUAGES = ( |
|
177b508612f4
add, configure and correct hdalab to installed apps
cavaliet
parents:
275
diff
changeset
|
138 |
('fr', ugettext('French')), |
|
177b508612f4
add, configure and correct hdalab to installed apps
cavaliet
parents:
275
diff
changeset
|
139 |
('en', ugettext('English')), |
|
177b508612f4
add, configure and correct hdalab to installed apps
cavaliet
parents:
275
diff
changeset
|
140 |
('it', ugettext('Italian')), |
|
177b508612f4
add, configure and correct hdalab to installed apps
cavaliet
parents:
275
diff
changeset
|
141 |
('de', ugettext('German')), |
|
177b508612f4
add, configure and correct hdalab to installed apps
cavaliet
parents:
275
diff
changeset
|
142 |
('es', ugettext('Spanish')), |
|
177b508612f4
add, configure and correct hdalab to installed apps
cavaliet
parents:
275
diff
changeset
|
143 |
('ja', ugettext('Japanese')), |
|
177b508612f4
add, configure and correct hdalab to installed apps
cavaliet
parents:
275
diff
changeset
|
144 |
#('zh-tw', ugettext('Chinese')), |
|
177b508612f4
add, configure and correct hdalab to installed apps
cavaliet
parents:
275
diff
changeset
|
145 |
) |
| 0 | 146 |
|
| 24 | 147 |
WIKIPEDIA_API_URL = "http://fr.wikipedia.org/w/api.php" |
| 66 | 148 |
WIKIPEDIA_VERSION_PERMALINK_TEMPLATE = "http://fr.wikipedia.org/w/index.php?oldid=%s" |
|
281
bc0f26b1acc2
Hdalab : commands now work after update. Requests update with a dbpedia url from settings.
cavaliet
parents:
279
diff
changeset
|
149 |
DBPEDIA_URI_TEMPLATE = "http://fr.dbpedia.org/%s/%s" |
|
bc0f26b1acc2
Hdalab : commands now work after update. Requests update with a dbpedia url from settings.
cavaliet
parents:
279
diff
changeset
|
150 |
#DBPEDIA_URI_TEMPLATE = "http://fr.dbpedia.org/resource/%s" |
| 47 | 151 |
|
|
55
e1098febb9d3
Merge with 1f01957a3eaed11ca63e7f75da1b326f8ac8de15 + some optimisations
ymh <ymh.work@gmail.com>
parents:
49
diff
changeset
|
152 |
SEARCH_STAR_CHARACTER = "*" |
|
e1098febb9d3
Merge with 1f01957a3eaed11ca63e7f75da1b326f8ac8de15 + some optimisations
ymh <ymh.work@gmail.com>
parents:
49
diff
changeset
|
153 |
PAGINATION_DEFAULT_NB_BY_PAGE = 50 |
|
e1098febb9d3
Merge with 1f01957a3eaed11ca63e7f75da1b326f8ac8de15 + some optimisations
ymh <ymh.work@gmail.com>
parents:
49
diff
changeset
|
154 |
|
| 275 | 155 |
# User class after migration to django > 1.6.5 |
156 |
AUTH_USER_MODEL = 'hdabo.User' |
|
157 |
||
| 292 | 158 |
ACCOUNT_ACTIVATION_DAYS = 7 |
159 |
||
| 0 | 160 |
from hdabo.config import * #@UnusedWildImport |
| 53 | 161 |
|
|
57
9eddefcafe8e
Merge with 50f3f48467e8af85b1671647208b9677fc724a84
ymh <ymh.work@gmail.com>
diff
changeset
|
162 |
if 'LOGIN_REDIRECT_URL' not in locals(): |
| 92 | 163 |
LOGIN_REDIRECT_URL = BASE_URL + "hdabo" |
|
57
9eddefcafe8e
Merge with 50f3f48467e8af85b1671647208b9677fc724a84
ymh <ymh.work@gmail.com>
diff
changeset
|
164 |
if 'LOGIN_URL' not in locals(): |
|
9eddefcafe8e
Merge with 50f3f48467e8af85b1671647208b9677fc724a84
ymh <ymh.work@gmail.com>
diff
changeset
|
165 |
LOGIN_URL = BASE_URL + "hdabo/accounts/login" |
| 53 | 166 |