##// END OF EJS Templates
fix conflict
slemonide -
r1215:eec100b5 default
parent child Browse files
Show More
@@ -1,240 +1,239 b''
1 1 # Django settings for neboard project.
2 2 import os
3 3
4 4 DEBUG = True
5 5 TEMPLATE_DEBUG = DEBUG
6 6
7 7 ADMINS = (
8 8 # ('Your Name', 'your_email@example.com'),
9 9 ('admin', 'admin@example.com')
10 10 )
11 11
12 12 MANAGERS = ADMINS
13 13
14 14 DATABASES = {
15 15 'default': {
16 16 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
17 17 'NAME': 'database.db', # Or path to database file if using sqlite3.
18 18 'USER': '', # Not used with sqlite3.
19 19 'PASSWORD': '', # Not used with sqlite3.
20 20 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
21 21 'PORT': '', # Set to empty string for default. Not used with sqlite3.
22 22 'CONN_MAX_AGE': None,
23 23 }
24 24 }
25 25
26 26 # Local time zone for this installation. Choices can be found here:
27 27 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
28 28 # although not all choices may be available on all operating systems.
29 29 # In a Windows environment this must be set to your system time zone.
30 30 TIME_ZONE = 'Europe/Kiev'
31 31
32 32 # Language code for this installation. All choices can be found here:
33 33 # http://www.i18nguy.com/unicode/language-identifiers.html
34 34 LANGUAGE_CODE = 'en'
35 35
36 36 SITE_ID = 1
37 37
38 38 # If you set this to False, Django will make some optimizations so as not
39 39 # to load the internationalization machinery.
40 40 USE_I18N = True
41 41
42 42 # If you set this to False, Django will not format dates, numbers and
43 43 # calendars according to the current locale.
44 44 USE_L10N = True
45 45
46 46 # If you set this to False, Django will not use timezone-aware datetimes.
47 47 USE_TZ = True
48 48
49 49 USE_ETAGS = True
50 50
51 51 # Absolute filesystem path to the directory that will hold user-uploaded files.
52 52 # Example: "/home/media/media.lawrence.com/media/"
53 53 MEDIA_ROOT = './media/'
54 54
55 55 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
56 56 # trailing slash.
57 57 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
58 58 MEDIA_URL = '/media/'
59 59
60 60 # Absolute path to the directory static files should be collected to.
61 61 # Don't put anything in this directory yourself; store your static files
62 62 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
63 63 # Example: "/home/media/media.lawrence.com/static/"
64 64 STATIC_ROOT = ''
65 65
66 66 # URL prefix for static files.
67 67 # Example: "http://media.lawrence.com/static/"
68 68 STATIC_URL = '/static/'
69 69
70 70 # Additional locations of static files
71 71 # It is really a hack, put real paths, not related
72 72 STATICFILES_DIRS = (
73 73 os.path.dirname(__file__) + '/boards/static',
74 74
75 75 # '/d/work/python/django/neboard/neboard/boards/static',
76 76 # Put strings here, like "/home/html/static" or "C:/www/django/static".
77 77 # Always use forward slashes, even on Windows.
78 78 # Don't forget to use absolute paths, not relative paths.
79 79 )
80 80
81 81 # List of finder classes that know how to find static files in
82 82 # various locations.
83 83 STATICFILES_FINDERS = (
84 84 'django.contrib.staticfiles.finders.FileSystemFinder',
85 85 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
86 # 'compressor.finders.CompressorFinder',
87 86 )
88 87
89 88 if DEBUG:
90 89 STATICFILES_STORAGE = \
91 90 'django.contrib.staticfiles.storage.StaticFilesStorage'
92 91 else:
93 92 STATICFILES_STORAGE = \
94 93 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'
95 94
96 95 # Make this unique, and don't share it with anybody.
97 96 SECRET_KEY = '@1rc$o(7=tt#kd+4s$u6wchm**z^)4x90)7f6z(i&55@o11*8o'
98 97
99 98 # List of callables that know how to import templates from various sources.
100 99 TEMPLATE_LOADERS = (
101 100 'django.template.loaders.filesystem.Loader',
102 101 'django.template.loaders.app_directories.Loader',
103 102 )
104 103
105 104 TEMPLATE_CONTEXT_PROCESSORS = (
106 105 'django.core.context_processors.media',
107 106 'django.core.context_processors.static',
108 107 'django.core.context_processors.request',
109 108 'django.contrib.auth.context_processors.auth',
110 109 'boards.context_processors.user_and_ui_processor',
111 110 )
112 111
113 112 MIDDLEWARE_CLASSES = (
114 113 'django.middleware.http.ConditionalGetMiddleware',
115 114 'django.contrib.sessions.middleware.SessionMiddleware',
116 115 'django.middleware.locale.LocaleMiddleware',
117 116 'django.middleware.common.CommonMiddleware',
118 117 'django.contrib.auth.middleware.AuthenticationMiddleware',
119 118 'django.contrib.messages.middleware.MessageMiddleware',
120 119 'boards.middlewares.BanMiddleware',
121 120 'boards.middlewares.TimezoneMiddleware',
122 121 )
123 122
124 123 ROOT_URLCONF = 'neboard.urls'
125 124
126 125 # Python dotted path to the WSGI application used by Django's runserver.
127 126 WSGI_APPLICATION = 'neboard.wsgi.application'
128 127
129 128 TEMPLATE_DIRS = (
130 129 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
131 130 # Always use forward slashes, even on Windows.
132 131 # Don't forget to use absolute paths, not relative paths.
133 132 'templates',
134 133 )
135 134
136 135 INSTALLED_APPS = (
137 136 'django.contrib.auth',
138 137 'django.contrib.contenttypes',
139 138 'django.contrib.sessions',
140 139 # 'django.contrib.sites',
141 140 'django.contrib.messages',
142 141 'django.contrib.staticfiles',
143 142 # Uncomment the next line to enable the admin:
144 143 'django.contrib.admin',
145 144 # Uncomment the next line to enable admin documentation:
146 145 # 'django.contrib.admindocs',
147 146 #'django.contrib.humanize',
148 147
149 148 'debug_toolbar',
150 149
151 150 # Search
152 151 'haystack',
153 152
154 153 'boards',
155 154 )
156 155
157 156 # A sample logging configuration. The only tangible logging
158 157 # performed by this configuration is to send an email to
159 158 # the site admins on every HTTP 500 error when DEBUG=False.
160 159 # See http://docs.djangoproject.com/en/dev/topics/logging for
161 160 # more details on how to customize your logging configuration.
162 161 LOGGING = {
163 162 'version': 1,
164 163 'disable_existing_loggers': False,
165 164 'formatters': {
166 165 'verbose': {
167 166 'format': '%(levelname)s %(asctime)s %(name)s %(process)d %(thread)d %(message)s'
168 167 },
169 168 'simple': {
170 169 'format': '%(levelname)s %(asctime)s [%(name)s] %(message)s'
171 170 },
172 171 },
173 172 'filters': {
174 173 'require_debug_false': {
175 174 '()': 'django.utils.log.RequireDebugFalse'
176 175 }
177 176 },
178 177 'handlers': {
179 178 'console': {
180 179 'level': 'DEBUG',
181 180 'class': 'logging.StreamHandler',
182 181 'formatter': 'simple'
183 182 },
184 183 },
185 184 'loggers': {
186 185 'boards': {
187 186 'handlers': ['console'],
188 187 'level': 'DEBUG',
189 188 }
190 189 },
191 190 }
192 191
193 192 HAYSTACK_CONNECTIONS = {
194 193 'default': {
195 194 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
196 195 'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'),
197 196 },
198 197 }
199 198
200 199 THEMES = [
201 200 ('md', 'Mystic Dark'),
202 201 ('md_centered', 'Mystic Dark (centered)'),
203 202 ('sw', 'Snow White'),
204 203 ('pg', 'Photon Gray'),
205 204 ]
206 205
207 206 IMAGE_VIEWERS = [
208 207 ('simple', 'Simple'),
209 208 ('popup', 'Popup'),
210 209 ]
211 210
212 211 POSTING_DELAY = 20 # seconds
213 212
214 213 # Websocket settins
215 214 CENTRIFUGE_HOST = 'localhost'
216 215 CENTRIFUGE_PORT = '9090'
217 216
218 217 CENTRIFUGE_ADDRESS = 'http://{}:{}'.format(CENTRIFUGE_HOST, CENTRIFUGE_PORT)
219 218 CENTRIFUGE_PROJECT_ID = '<project id here>'
220 219 CENTRIFUGE_PROJECT_SECRET = '<project secret here>'
221 220 CENTRIFUGE_TIMEOUT = 5
222 221
223 222 # Debug mode middlewares
224 223 if DEBUG:
225 224 MIDDLEWARE_CLASSES += (
226 225 'debug_toolbar.middleware.DebugToolbarMiddleware',
227 226 )
228 227
229 228 def custom_show_toolbar(request):
230 229 return True
231 230
232 231 DEBUG_TOOLBAR_CONFIG = {
233 232 'ENABLE_STACKTRACES': True,
234 233 'SHOW_TOOLBAR_CALLBACK': 'neboard.settings.custom_show_toolbar',
235 234 }
236 235
237 236 # FIXME Uncommenting this fails somehow. Need to investigate this
238 237 #DEBUG_TOOLBAR_PANELS += (
239 238 # 'debug_toolbar.panels.profiling.ProfilingDebugPanel',
240 239 #)
General Comments 0
You need to be logged in to leave comments. Login now