Show More
@@ -1,463 +1,473 b'' | |||
|
1 | 1 | html { |
|
2 | 2 | background: #555; |
|
3 | 3 | color: #ffffff; |
|
4 | 4 | } |
|
5 | 5 | |
|
6 | 6 | body { |
|
7 | 7 | margin: 0; |
|
8 | 8 | } |
|
9 | 9 | |
|
10 | 10 | #admin_panel { |
|
11 | 11 | background: #FF0000; |
|
12 | 12 | color: #00FF00 |
|
13 | 13 | } |
|
14 | 14 | |
|
15 | 15 | .input_field_error { |
|
16 | 16 | color: #FF0000; |
|
17 | 17 | } |
|
18 | 18 | |
|
19 | 19 | .title { |
|
20 | 20 | font-weight: bold; |
|
21 | 21 | color: #ffcc00; |
|
22 | 22 | } |
|
23 | 23 | |
|
24 | 24 | .link, a { |
|
25 | 25 | color: #afdcec; |
|
26 | 26 | } |
|
27 | 27 | |
|
28 | 28 | .block { |
|
29 | 29 | display: inline-block; |
|
30 | 30 | vertical-align: top; |
|
31 | 31 | } |
|
32 | 32 | |
|
33 | 33 | .tag { |
|
34 | 34 | color: #FFD37D; |
|
35 | 35 | } |
|
36 | 36 | |
|
37 | 37 | .post_id { |
|
38 | 38 | color: #fff380; |
|
39 | 39 | } |
|
40 | 40 | |
|
41 | 41 | .post, .dead_post, .archive_post, #posts-table { |
|
42 | 42 | background: #333; |
|
43 | 43 | padding: 10px; |
|
44 | 44 | clear: left; |
|
45 | 45 | word-wrap: break-word; |
|
46 | 46 | border-top: 1px solid #777; |
|
47 | 47 | border-bottom: 1px solid #777; |
|
48 | 48 | } |
|
49 | 49 | |
|
50 | 50 | .post + .post { |
|
51 | 51 | border-top: none; |
|
52 | 52 | } |
|
53 | 53 | |
|
54 | 54 | .dead_post + .dead_post { |
|
55 | 55 | border-top: none; |
|
56 | 56 | } |
|
57 | 57 | |
|
58 | 58 | .archive_post + .archive_post { |
|
59 | 59 | border-top: none; |
|
60 | 60 | } |
|
61 | 61 | |
|
62 | 62 | .metadata { |
|
63 | 63 | padding-top: 5px; |
|
64 | 64 | margin-top: 10px; |
|
65 | 65 | border-top: solid 1px #666; |
|
66 | 66 | color: #ddd; |
|
67 | 67 | } |
|
68 | 68 | |
|
69 | 69 | .navigation_panel, .tag_info { |
|
70 | 70 | background: #444; |
|
71 | 71 | margin-bottom: 5px; |
|
72 | 72 | margin-top: 5px; |
|
73 | 73 | padding: 10px; |
|
74 | 74 | border-bottom: solid 1px #888; |
|
75 | 75 | border-top: solid 1px #888; |
|
76 | 76 | color: #eee; |
|
77 | 77 | } |
|
78 | 78 | |
|
79 | 79 | .navigation_panel .link { |
|
80 | 80 | border-right: 1px solid #fff; |
|
81 | 81 | font-weight: bold; |
|
82 | 82 | margin-right: 1ex; |
|
83 | 83 | padding-right: 1ex; |
|
84 | 84 | } |
|
85 | 85 | .navigation_panel .link:last-child { |
|
86 | 86 | border-left: 1px solid #fff; |
|
87 | 87 | border-right: none; |
|
88 | 88 | float: right; |
|
89 | 89 | margin-left: 1ex; |
|
90 | 90 | margin-right: 0; |
|
91 | 91 | padding-left: 1ex; |
|
92 | 92 | padding-right: 0; |
|
93 | 93 | } |
|
94 | 94 | |
|
95 | 95 | .navigation_panel::after, .post::after { |
|
96 | 96 | clear: both; |
|
97 | 97 | content: "."; |
|
98 | 98 | display: block; |
|
99 | 99 | height: 0; |
|
100 | 100 | line-height: 0; |
|
101 | 101 | visibility: hidden; |
|
102 | 102 | } |
|
103 | 103 | |
|
104 | .header { | |
|
105 | border-bottom: solid 1px #888; | |
|
106 | margin-bottom: 5px; | |
|
107 | border-top: none; | |
|
108 | margin-top: 0; | |
|
109 | } | |
|
110 | ||
|
111 | .footer { | |
|
112 | border-top: solid 1px #888; | |
|
113 | margin-top: 5px; | |
|
114 | border-bottom: none; | |
|
115 | margin-bottom: 0; | |
|
116 | } | |
|
117 | ||
|
104 | 118 | p, .br { |
|
105 | 119 | margin-top: .5em; |
|
106 | 120 | margin-bottom: .5em; |
|
107 | 121 | } |
|
108 | 122 | |
|
109 | 123 | .post-form-w { |
|
110 | 124 | background: #333344; |
|
111 | 125 | border-top: solid 1px #888; |
|
112 | 126 | border-bottom: solid 1px #888; |
|
113 | 127 | color: #fff; |
|
114 | 128 | padding: 10px; |
|
115 | 129 | margin-bottom: 5px; |
|
116 | 130 | margin-top: 5px; |
|
117 | 131 | } |
|
118 | 132 | |
|
119 | 133 | .form-row { |
|
120 | 134 | width: 100%; |
|
121 | 135 | } |
|
122 | 136 | |
|
123 | 137 | .form-label { |
|
124 | 138 | padding: .25em 1ex .25em 0; |
|
125 | 139 | vertical-align: top; |
|
126 | 140 | } |
|
127 | 141 | |
|
128 | 142 | .form-input { |
|
129 | 143 | padding: .25em 0; |
|
130 | 144 | } |
|
131 | 145 | |
|
132 | 146 | .form-errors { |
|
133 | 147 | font-weight: bolder; |
|
134 | 148 | vertical-align: middle; |
|
135 | 149 | } |
|
136 | 150 | |
|
137 | 151 | .post-form input:not([name="image"]), .post-form textarea { |
|
138 | 152 | background: #333; |
|
139 | 153 | color: #fff; |
|
140 | 154 | border: solid 1px; |
|
141 | 155 | padding: 0; |
|
142 | 156 | font: medium sans-serif; |
|
143 | 157 | width: 100%; |
|
144 | 158 | } |
|
145 | 159 | |
|
146 | 160 | .form-submit { |
|
147 | 161 | display: table; |
|
148 | 162 | margin-bottom: 1ex; |
|
149 | 163 | margin-top: 1ex; |
|
150 | 164 | } |
|
151 | 165 | |
|
152 | 166 | .form-title { |
|
153 | 167 | font-weight: bold; |
|
154 | 168 | font-size: 2ex; |
|
155 | 169 | margin-bottom: 0.5ex; |
|
156 | 170 | } |
|
157 | 171 | |
|
158 | 172 | .post-form input[type="submit"], input[type="submit"] { |
|
159 | 173 | background: #222; |
|
160 | 174 | border: solid 2px #fff; |
|
161 | 175 | color: #fff; |
|
162 | 176 | padding: 0.5ex; |
|
163 | 177 | } |
|
164 | 178 | |
|
165 | 179 | input[type="submit"]:hover { |
|
166 | 180 | background: #060; |
|
167 | 181 | } |
|
168 | 182 | |
|
169 | 183 | blockquote { |
|
170 | 184 | border-left: solid 2px; |
|
171 | 185 | padding-left: 5px; |
|
172 | 186 | color: #B1FB17; |
|
173 | 187 | margin: 0; |
|
174 | 188 | } |
|
175 | 189 | |
|
176 | 190 | .post > .image { |
|
177 | 191 | float: left; |
|
178 | 192 | margin: 0 1ex .5ex 0; |
|
179 | 193 | min-width: 1px; |
|
180 | 194 | text-align: center; |
|
181 | 195 | display: table-row; |
|
182 | 196 | } |
|
183 | 197 | |
|
184 | 198 | .post > .metadata { |
|
185 | 199 | clear: left; |
|
186 | 200 | } |
|
187 | 201 | |
|
188 | 202 | .get { |
|
189 | 203 | font-weight: bold; |
|
190 | 204 | color: #d55; |
|
191 | 205 | } |
|
192 | 206 | |
|
193 | 207 | * { |
|
194 | 208 | text-decoration: none; |
|
195 | 209 | } |
|
196 | 210 | |
|
197 | 211 | .dead_post { |
|
198 | 212 | background-color: #442222; |
|
199 | 213 | } |
|
200 | 214 | |
|
201 | 215 | .archive_post { |
|
202 | 216 | background-color: #000; |
|
203 | 217 | } |
|
204 | 218 | |
|
205 | 219 | .mark_btn { |
|
206 | 220 | border: 1px solid; |
|
207 | 221 | min-width: 2ex; |
|
208 | 222 | padding: 2px 2ex; |
|
209 | 223 | } |
|
210 | 224 | |
|
211 | 225 | .mark_btn:hover { |
|
212 | 226 | background: #555; |
|
213 | 227 | } |
|
214 | 228 | |
|
215 | 229 | .quote { |
|
216 | 230 | color: #92cf38; |
|
217 | 231 | font-style: italic; |
|
218 | 232 | } |
|
219 | 233 | |
|
220 | 234 | .multiquote { |
|
221 | 235 | padding: 3px; |
|
222 | 236 | display: inline-block; |
|
223 | 237 | background: #222; |
|
224 | 238 | border-style: solid; |
|
225 | 239 | border-width: 1px 1px 1px 4px; |
|
226 | 240 | font-size: 0.9em; |
|
227 | 241 | } |
|
228 | 242 | |
|
229 | 243 | .spoiler { |
|
230 | 244 | background: white; |
|
231 | 245 | color: white; |
|
232 | 246 | } |
|
233 | 247 | |
|
234 | 248 | .spoiler:hover { |
|
235 | 249 | color: black; |
|
236 | 250 | } |
|
237 | 251 | |
|
238 | 252 | .comment { |
|
239 | 253 | color: #eb2; |
|
240 | 254 | } |
|
241 | 255 | |
|
242 | 256 | a:hover { |
|
243 | 257 | text-decoration: underline; |
|
244 | 258 | } |
|
245 | 259 | |
|
246 | 260 | .last-replies { |
|
247 | 261 | margin-left: 3ex; |
|
248 | 262 | margin-right: 3ex; |
|
249 | 263 | border-left: solid 1px #777; |
|
250 | 264 | border-right: solid 1px #777; |
|
251 | 265 | } |
|
252 | 266 | |
|
253 | 267 | .last-replies > .post:first-child { |
|
254 | 268 | border-top: none; |
|
255 | 269 | } |
|
256 | 270 | |
|
257 | 271 | .thread { |
|
258 | 272 | margin-bottom: 3ex; |
|
259 | 273 | margin-top: 1ex; |
|
260 | 274 | } |
|
261 | 275 | |
|
262 | 276 | .post:target { |
|
263 | 277 | border: solid 2px white; |
|
264 | 278 | } |
|
265 | 279 | |
|
266 | 280 | pre{ |
|
267 | 281 | white-space:pre-wrap |
|
268 | 282 | } |
|
269 | 283 | |
|
270 | 284 | li { |
|
271 | 285 | list-style-position: inside; |
|
272 | 286 | } |
|
273 | 287 | |
|
274 | 288 | .fancybox-skin { |
|
275 | 289 | position: relative; |
|
276 | 290 | background-color: #fff; |
|
277 | 291 | color: #ddd; |
|
278 | 292 | text-shadow: none; |
|
279 | 293 | } |
|
280 | 294 | |
|
281 | 295 | .fancybox-image { |
|
282 | 296 | border: 1px solid black; |
|
283 | 297 | } |
|
284 | 298 | |
|
285 | 299 | .image-mode-tab { |
|
286 | 300 | background: #444; |
|
287 | 301 | color: #eee; |
|
288 | 302 | margin-top: 5px; |
|
289 | 303 | padding: 5px; |
|
290 | 304 | border-top: 1px solid #888; |
|
291 | 305 | border-bottom: 1px solid #888; |
|
292 | 306 | } |
|
293 | 307 | |
|
294 | 308 | .image-mode-tab > label { |
|
295 | 309 | margin: 0 1ex; |
|
296 | 310 | } |
|
297 | 311 | |
|
298 | 312 | .image-mode-tab > label > input { |
|
299 | 313 | margin-right: .5ex; |
|
300 | 314 | } |
|
301 | 315 | |
|
302 | 316 | #posts-table { |
|
303 | 317 | margin-top: 5px; |
|
304 | 318 | margin-bottom: 5px; |
|
305 | 319 | } |
|
306 | 320 | |
|
307 | 321 | .tag_info > h2 { |
|
308 | 322 | margin: 0; |
|
309 | 323 | } |
|
310 | 324 | |
|
311 | 325 | .post-info { |
|
312 | 326 | color: #ddd; |
|
313 | 327 | margin-bottom: 1ex; |
|
314 | 328 | } |
|
315 | 329 | |
|
316 | 330 | .moderator_info { |
|
317 | 331 | color: #e99d41; |
|
318 | 332 | float: right; |
|
319 | 333 | font-weight: bold; |
|
320 | 334 | } |
|
321 | 335 | |
|
322 | 336 | .refmap { |
|
323 | 337 | font-size: 0.9em; |
|
324 | 338 | color: #ccc; |
|
325 | 339 | margin-top: 1em; |
|
326 | 340 | } |
|
327 | 341 | |
|
328 | 342 | .fav { |
|
329 | 343 | color: yellow; |
|
330 | 344 | } |
|
331 | 345 | |
|
332 | 346 | .not_fav { |
|
333 | 347 | color: #ccc; |
|
334 | 348 | } |
|
335 | 349 | |
|
336 | 350 | .role { |
|
337 | 351 | text-decoration: underline; |
|
338 | 352 | } |
|
339 | 353 | |
|
340 | 354 | .form-email { |
|
341 | 355 | display: none; |
|
342 | 356 | } |
|
343 | 357 | |
|
344 | .footer { | |
|
345 | margin: 5px; | |
|
346 | } | |
|
347 | ||
|
348 | 358 | .bar-value { |
|
349 | 359 | background: rgba(50, 55, 164, 0.45); |
|
350 | 360 | font-size: 0.9em; |
|
351 | 361 | height: 1.5em; |
|
352 | 362 | } |
|
353 | 363 | |
|
354 | 364 | .bar-bg { |
|
355 | 365 | position: relative; |
|
356 | 366 | border-top: solid 1px #888; |
|
357 | 367 | border-bottom: solid 1px #888; |
|
358 | 368 | margin-top: 5px; |
|
359 | 369 | overflow: hidden; |
|
360 | 370 | } |
|
361 | 371 | |
|
362 | 372 | .bar-text { |
|
363 | 373 | padding: 2px; |
|
364 | 374 | position: absolute; |
|
365 | 375 | left: 0; |
|
366 | 376 | top: 0; |
|
367 | 377 | } |
|
368 | 378 | |
|
369 | 379 | .page_link { |
|
370 | 380 | background: #444; |
|
371 | 381 | border-top: solid 1px #888; |
|
372 | 382 | border-bottom: solid 1px #888; |
|
373 | 383 | padding: 5px; |
|
374 | 384 | color: #eee; |
|
375 | 385 | font-size: 2ex; |
|
376 | 386 | } |
|
377 | 387 | |
|
378 | 388 | .skipped_replies { |
|
379 | 389 | padding: 5px; |
|
380 | 390 | margin-left: 3ex; |
|
381 | 391 | margin-right: 3ex; |
|
382 | 392 | border-left: solid 1px #888; |
|
383 | 393 | border-right: solid 1px #888; |
|
384 | 394 | border-bottom: solid 1px #888; |
|
385 | 395 | background: #000; |
|
386 | 396 | } |
|
387 | 397 | |
|
388 | 398 | .current_page { |
|
389 | 399 | border: solid 1px #afdcec; |
|
390 | 400 | padding: 2px; |
|
391 | 401 | } |
|
392 | 402 | |
|
393 | 403 | .current_mode { |
|
394 | 404 | font-weight: bold; |
|
395 | 405 | } |
|
396 | 406 | |
|
397 | 407 | .gallery_image { |
|
398 | 408 | border: solid 1px; |
|
399 | 409 | padding: 0.5ex; |
|
400 | 410 | margin: 0.5ex; |
|
401 | 411 | text-align: center; |
|
402 | 412 | } |
|
403 | 413 | |
|
404 | 414 | code { |
|
405 | 415 | border: dashed 1px #ccc; |
|
406 | 416 | background: #111; |
|
407 | 417 | padding: 2px; |
|
408 | 418 | font-size: 1.2em; |
|
409 | 419 | display: inline-block; |
|
410 | 420 | } |
|
411 | 421 | |
|
412 | 422 | pre { |
|
413 | 423 | overflow: auto; |
|
414 | 424 | } |
|
415 | 425 | |
|
416 | 426 | .img-full { |
|
417 | 427 | background: #222; |
|
418 | 428 | border: solid 1px white; |
|
419 | 429 | } |
|
420 | 430 | |
|
421 | 431 | .tag_item { |
|
422 | 432 | display: inline-block; |
|
423 | 433 | border: 1px dashed #666; |
|
424 | 434 | margin: 0.2ex; |
|
425 | 435 | padding: 0.1ex; |
|
426 | 436 | } |
|
427 | 437 | |
|
428 | 438 | #id_models li { |
|
429 | 439 | list-style: none; |
|
430 | 440 | } |
|
431 | 441 | |
|
432 | 442 | #id_q { |
|
433 | 443 | margin-left: 1ex; |
|
434 | 444 | } |
|
435 | 445 | |
|
436 | 446 | ul { |
|
437 | 447 | padding-left: 0px; |
|
438 | 448 | } |
|
439 | 449 | |
|
440 | 450 | .quote-header { |
|
441 | 451 | border-bottom: 2px solid #ddd; |
|
442 | 452 | margin-bottom: 1ex; |
|
443 | 453 | padding-bottom: .5ex; |
|
444 | 454 | color: #ddd; |
|
445 | 455 | font-size: 1.2em; |
|
446 | 456 | } |
|
447 | 457 | |
|
448 | 458 | /* Reflink preview */ |
|
449 | 459 | .post_preview { |
|
450 | 460 | border-left: 1px solid #777; |
|
451 | 461 | border-right: 1px solid #777; |
|
452 | 462 | } |
|
453 | 463 | |
|
454 | 464 | /* Code highlighter */ |
|
455 | 465 | .hljs { |
|
456 | 466 | color: #fff; |
|
457 | 467 | background: #000; |
|
458 | 468 | display: inline-block; |
|
459 | 469 | } |
|
460 | 470 | |
|
461 | 471 | .hljs, .hljs-subst, .hljs-tag .hljs-title, .lisp .hljs-title, .clojure .hljs-built_in, .nginx .hljs-title { |
|
462 | 472 | color: #fff; |
|
463 | 473 | } |
@@ -1,62 +1,58 b'' | |||
|
1 | 1 | {% load staticfiles %} |
|
2 | 2 | {% load i18n %} |
|
3 | 3 | {% load l10n %} |
|
4 | 4 | {% load static from staticfiles %} |
|
5 | 5 | |
|
6 | 6 | <!DOCTYPE html> |
|
7 | 7 | <html> |
|
8 | 8 | <head> |
|
9 | 9 | <link rel="stylesheet" type="text/css" href="{% static 'css/base.css' %}" media="all"/> |
|
10 | 10 | <link rel="stylesheet" type="text/css" href="{% static 'css/3party/highlight.css' %}" media="all"/> |
|
11 | 11 | <link rel="stylesheet" type="text/css" href="{% static theme_css %}" media="all"/> |
|
12 | 12 | <link rel="alternate" type="application/rss+xml" href="rss/" title="{% trans 'Feed' %}"/> |
|
13 | 13 | |
|
14 | 14 | <link rel="icon" type="image/png" |
|
15 | 15 | href="{% static 'favicon.png' %}"> |
|
16 | 16 | |
|
17 | 17 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
|
18 | 18 | <meta charset="utf-8"/> |
|
19 | 19 | |
|
20 | 20 | {% block head %}{% endblock %} |
|
21 | 21 | </head> |
|
22 | 22 | <body> |
|
23 | 23 | <script src="{% static 'js/jquery-2.0.1.min.js' %}"></script> |
|
24 | 24 | <script src="{% static 'js/jquery-ui-1.10.3.custom.min.js' %}"></script> |
|
25 | 25 | <script src="{% static 'js/jquery.mousewheel.js' %}"></script> |
|
26 | 26 | <script src="{% url 'js_info_dict' %}"></script> |
|
27 | 27 | |
|
28 | <div class="navigation_panel"> | |
|
28 | <div class="navigation_panel header"> | |
|
29 | 29 | <a class="link" href="{% url 'index' %}">{% trans "All threads" %}</a> |
|
30 | 30 | {% for tag in tags %} |
|
31 | 31 | <a class="tag" href="{% url 'tag' tag_name=tag.name %}" |
|
32 | 32 | >#{{ tag.name }}</a>, |
|
33 | 33 | {% endfor %} |
|
34 | 34 | <a href="{% url 'tags' %}" title="{% trans 'Tag management' %}" |
|
35 | 35 | >[...]</a>, |
|
36 | 36 | <a href="{% url 'search' %}" title="{% trans 'Search' %}">[S]</a> |
|
37 | 37 | <a class="link" href="{% url 'settings' %}">{% trans 'Settings' %}</a> |
|
38 | 38 | </div> |
|
39 | 39 | |
|
40 | 40 | {% block content %}{% endblock %} |
|
41 | 41 | |
|
42 | 42 | <script src="{% static 'js/popup.js' %}"></script> |
|
43 | 43 | <script src="{% static 'js/image.js' %}"></script> |
|
44 | 44 | <script src="{% static 'js/3party/highlight.min.js' %}"></script> |
|
45 | 45 | <script src="{% static 'js/refpopup.js' %}"></script> |
|
46 | 46 | <script src="{% static 'js/main.js' %}"></script> |
|
47 | 47 | |
|
48 | <div class="navigation_panel"> | |
|
48 | <div class="navigation_panel footer"> | |
|
49 | 49 | {% block metapanel %}{% endblock %} |
|
50 | 50 | [<a href="{% url 'admin:index' %}">{% trans 'Admin' %}</a>] |
|
51 | 51 | {% with ppd=posts_per_day|floatformat:2 %} |
|
52 | 52 | {% blocktrans %}Speed: {{ ppd }} posts per day{% endblocktrans %} |
|
53 | 53 | {% endwith %} |
|
54 | 54 | <a class="link" href="#top">{% trans 'Up' %}</a> |
|
55 | 55 | </div> |
|
56 | 56 | |
|
57 | <div class="footer"> | |
|
58 | <!-- Put your banners here --> | |
|
59 | </div> | |
|
60 | ||
|
61 | 57 | </body> |
|
62 | 58 | </html> |
@@ -1,250 +1,235 b'' | |||
|
1 | 1 | # Django settings for neboard project. |
|
2 | 2 | import os |
|
3 | 3 | from boards.mdx_neboard import bbcode_extended |
|
4 | 4 | |
|
5 | 5 | DEBUG = True |
|
6 | 6 | TEMPLATE_DEBUG = DEBUG |
|
7 | 7 | |
|
8 | 8 | ADMINS = ( |
|
9 | 9 | # ('Your Name', 'your_email@example.com'), |
|
10 | 10 | ('admin', 'admin@example.com') |
|
11 | 11 | ) |
|
12 | 12 | |
|
13 | 13 | MANAGERS = ADMINS |
|
14 | 14 | |
|
15 | 15 | DATABASES = { |
|
16 | 16 | 'default': { |
|
17 | 17 | 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
|
18 | 18 | 'NAME': 'database.db', # Or path to database file if using sqlite3. |
|
19 | 19 | 'USER': '', # Not used with sqlite3. |
|
20 | 20 | 'PASSWORD': '', # Not used with sqlite3. |
|
21 | 21 | 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
|
22 | 22 | 'PORT': '', # Set to empty string for default. Not used with sqlite3. |
|
23 | 23 | 'CONN_MAX_AGE': None, |
|
24 | 24 | } |
|
25 | 25 | } |
|
26 | 26 | |
|
27 | 27 | # Local time zone for this installation. Choices can be found here: |
|
28 | 28 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
|
29 | 29 | # although not all choices may be available on all operating systems. |
|
30 | 30 | # In a Windows environment this must be set to your system time zone. |
|
31 | 31 | TIME_ZONE = 'Europe/Kiev' |
|
32 | 32 | |
|
33 | 33 | # Language code for this installation. All choices can be found here: |
|
34 | 34 | # http://www.i18nguy.com/unicode/language-identifiers.html |
|
35 | 35 | LANGUAGE_CODE = 'en' |
|
36 | 36 | |
|
37 | 37 | SITE_ID = 1 |
|
38 | 38 | |
|
39 | 39 | # If you set this to False, Django will make some optimizations so as not |
|
40 | 40 | # to load the internationalization machinery. |
|
41 | 41 | USE_I18N = True |
|
42 | 42 | |
|
43 | 43 | # If you set this to False, Django will not format dates, numbers and |
|
44 | 44 | # calendars according to the current locale. |
|
45 | 45 | USE_L10N = True |
|
46 | 46 | |
|
47 | 47 | # If you set this to False, Django will not use timezone-aware datetimes. |
|
48 | 48 | USE_TZ = True |
|
49 | 49 | |
|
50 | 50 | # Absolute filesystem path to the directory that will hold user-uploaded files. |
|
51 | 51 | # Example: "/home/media/media.lawrence.com/media/" |
|
52 | 52 | MEDIA_ROOT = './media/' |
|
53 | 53 | |
|
54 | 54 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
55 | 55 | # trailing slash. |
|
56 | 56 | # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" |
|
57 | 57 | MEDIA_URL = '/media/' |
|
58 | 58 | |
|
59 | 59 | # Absolute path to the directory static files should be collected to. |
|
60 | 60 | # Don't put anything in this directory yourself; store your static files |
|
61 | 61 | # in apps' "static/" subdirectories and in STATICFILES_DIRS. |
|
62 | 62 | # Example: "/home/media/media.lawrence.com/static/" |
|
63 | 63 | STATIC_ROOT = '' |
|
64 | 64 | |
|
65 | 65 | # URL prefix for static files. |
|
66 | 66 | # Example: "http://media.lawrence.com/static/" |
|
67 | 67 | STATIC_URL = '/static/' |
|
68 | 68 | |
|
69 | 69 | # Additional locations of static files |
|
70 | 70 | # It is really a hack, put real paths, not related |
|
71 | 71 | STATICFILES_DIRS = ( |
|
72 | 72 | os.path.dirname(__file__) + '/boards/static', |
|
73 | 73 | |
|
74 | 74 | # '/d/work/python/django/neboard/neboard/boards/static', |
|
75 | 75 | # Put strings here, like "/home/html/static" or "C:/www/django/static". |
|
76 | 76 | # Always use forward slashes, even on Windows. |
|
77 | 77 | # Don't forget to use absolute paths, not relative paths. |
|
78 | 78 | ) |
|
79 | 79 | |
|
80 | 80 | # List of finder classes that know how to find static files in |
|
81 | 81 | # various locations. |
|
82 | 82 | STATICFILES_FINDERS = ( |
|
83 | 83 | 'django.contrib.staticfiles.finders.FileSystemFinder', |
|
84 | 84 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|
85 | 85 | ) |
|
86 | 86 | |
|
87 | 87 | if DEBUG: |
|
88 | 88 | STATICFILES_STORAGE = \ |
|
89 | 89 | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
|
90 | 90 | else: |
|
91 | 91 | STATICFILES_STORAGE = \ |
|
92 | 92 | 'django.contrib.staticfiles.storage.CachedStaticFilesStorage' |
|
93 | 93 | |
|
94 | 94 | # Make this unique, and don't share it with anybody. |
|
95 | 95 | SECRET_KEY = '@1rc$o(7=tt#kd+4s$u6wchm**z^)4x90)7f6z(i&55@o11*8o' |
|
96 | 96 | |
|
97 | 97 | # List of callables that know how to import templates from various sources. |
|
98 | 98 | TEMPLATE_LOADERS = ( |
|
99 | 99 | 'django.template.loaders.filesystem.Loader', |
|
100 | 100 | 'django.template.loaders.app_directories.Loader', |
|
101 | 101 | ) |
|
102 | 102 | |
|
103 | 103 | TEMPLATE_CONTEXT_PROCESSORS = ( |
|
104 | 104 | 'django.core.context_processors.media', |
|
105 | 105 | 'django.core.context_processors.static', |
|
106 | 106 | 'django.core.context_processors.request', |
|
107 | 107 | 'django.contrib.auth.context_processors.auth', |
|
108 | 108 | 'boards.context_processors.user_and_ui_processor', |
|
109 | 109 | ) |
|
110 | 110 | |
|
111 | 111 | MIDDLEWARE_CLASSES = ( |
|
112 | 112 | 'django.contrib.sessions.middleware.SessionMiddleware', |
|
113 | 113 | 'django.middleware.locale.LocaleMiddleware', |
|
114 | 114 | 'django.middleware.common.CommonMiddleware', |
|
115 | 115 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
116 | 116 | 'django.contrib.messages.middleware.MessageMiddleware', |
|
117 | 117 | 'boards.middlewares.BanMiddleware', |
|
118 | 118 | 'boards.middlewares.MinifyHTMLMiddleware', |
|
119 | 119 | ) |
|
120 | 120 | |
|
121 | 121 | ROOT_URLCONF = 'neboard.urls' |
|
122 | 122 | |
|
123 | 123 | # Python dotted path to the WSGI application used by Django's runserver. |
|
124 | 124 | WSGI_APPLICATION = 'neboard.wsgi.application' |
|
125 | 125 | |
|
126 | 126 | TEMPLATE_DIRS = ( |
|
127 | 127 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
|
128 | 128 | # Always use forward slashes, even on Windows. |
|
129 | 129 | # Don't forget to use absolute paths, not relative paths. |
|
130 | 130 | 'templates', |
|
131 | 131 | ) |
|
132 | 132 | |
|
133 | 133 | INSTALLED_APPS = ( |
|
134 | 134 | 'django.contrib.auth', |
|
135 | 135 | 'django.contrib.contenttypes', |
|
136 | 136 | 'django.contrib.sessions', |
|
137 | 137 | # 'django.contrib.sites', |
|
138 | 138 | 'django.contrib.messages', |
|
139 | 139 | 'django.contrib.staticfiles', |
|
140 | 140 | # Uncomment the next line to enable the admin: |
|
141 | 141 | 'django.contrib.admin', |
|
142 | 142 | # Uncomment the next line to enable admin documentation: |
|
143 | 143 | # 'django.contrib.admindocs', |
|
144 | 144 | 'django.contrib.humanize', |
|
145 | 145 | 'django_cleanup', |
|
146 | 146 | |
|
147 | 147 | # Migrations |
|
148 | 148 | 'south', |
|
149 | 149 | 'debug_toolbar', |
|
150 | 150 | |
|
151 | 151 | # Search |
|
152 | 152 | 'haystack', |
|
153 | 153 | |
|
154 | 154 | 'boards', |
|
155 | 155 | ) |
|
156 | 156 | |
|
157 | DEBUG_TOOLBAR_PANELS = ( | |
|
158 | 'debug_toolbar.panels.version.VersionDebugPanel', | |
|
159 | 'debug_toolbar.panels.timer.TimerDebugPanel', | |
|
160 | 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', | |
|
161 | 'debug_toolbar.panels.headers.HeaderDebugPanel', | |
|
162 | 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', | |
|
163 | 'debug_toolbar.panels.template.TemplateDebugPanel', | |
|
164 | 'debug_toolbar.panels.sql.SQLDebugPanel', | |
|
165 | 'debug_toolbar.panels.signals.SignalDebugPanel', | |
|
166 | 'debug_toolbar.panels.logger.LoggingPanel', | |
|
167 | ) | |
|
168 | ||
|
169 | 157 | # A sample logging configuration. The only tangible logging |
|
170 | 158 | # performed by this configuration is to send an email to |
|
171 | 159 | # the site admins on every HTTP 500 error when DEBUG=False. |
|
172 | 160 | # See http://docs.djangoproject.com/en/dev/topics/logging for |
|
173 | 161 | # more details on how to customize your logging configuration. |
|
174 | 162 | LOGGING = { |
|
175 | 163 | 'version': 1, |
|
176 | 164 | 'disable_existing_loggers': False, |
|
177 | 165 | 'formatters': { |
|
178 | 166 | 'verbose': { |
|
179 | 167 | 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' |
|
180 | 168 | }, |
|
181 | 169 | 'simple': { |
|
182 | 170 | 'format': '%(levelname)s %(asctime)s [%(module)s] %(message)s' |
|
183 | 171 | }, |
|
184 | 172 | }, |
|
185 | 173 | 'filters': { |
|
186 | 174 | 'require_debug_false': { |
|
187 | 175 | '()': 'django.utils.log.RequireDebugFalse' |
|
188 | 176 | } |
|
189 | 177 | }, |
|
190 | 178 | 'handlers': { |
|
191 | 179 | 'console': { |
|
192 | 180 | 'level': 'DEBUG', |
|
193 | 181 | 'class': 'logging.StreamHandler', |
|
194 | 182 | 'formatter': 'simple' |
|
195 | 183 | }, |
|
196 | 184 | }, |
|
197 | 185 | 'loggers': { |
|
198 | 186 | 'boards': { |
|
199 | 187 | 'handlers': ['console'], |
|
200 | 188 | 'level': 'DEBUG', |
|
201 | 189 | } |
|
202 | 190 | }, |
|
203 | 191 | } |
|
204 | 192 | |
|
205 | 193 | HAYSTACK_CONNECTIONS = { |
|
206 | 194 | 'default': { |
|
207 | 195 | 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', |
|
208 | 196 | 'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'), |
|
209 | 197 | }, |
|
210 | 198 | } |
|
211 | 199 | |
|
212 | 200 | MARKUP_FIELD_TYPES = ( |
|
213 | 201 | ('bbcode', bbcode_extended), |
|
214 | 202 | ) |
|
215 | 203 | |
|
216 | 204 | THEMES = [ |
|
217 | 205 | ('md', 'Mystic Dark'), |
|
218 | 206 | ('md_centered', 'Mystic Dark (centered)'), |
|
219 | 207 | ('sw', 'Snow White'), |
|
220 | 208 | ('pg', 'Photon Gray'), |
|
221 | 209 | ] |
|
222 | 210 | |
|
223 | 211 | POPULAR_TAGS = 10 |
|
224 | 212 | |
|
225 | 213 | POSTING_DELAY = 20 # seconds |
|
226 | 214 | |
|
227 | 215 | COMPRESS_HTML = True |
|
228 | 216 | |
|
229 | 217 | # Debug mode middlewares |
|
230 | 218 | if DEBUG: |
|
231 | 219 | MIDDLEWARE_CLASSES += ( |
|
232 | #'boards.profiler.ProfilerMiddleware', | |
|
233 | 220 | 'debug_toolbar.middleware.DebugToolbarMiddleware', |
|
234 | 221 | ) |
|
235 | 222 | |
|
236 | 223 | def custom_show_toolbar(request): |
|
237 |
return |
|
|
224 | return False | |
|
238 | 225 | |
|
239 | 226 | DEBUG_TOOLBAR_CONFIG = { |
|
240 | 'INTERCEPT_REDIRECTS': False, | |
|
241 | 'SHOW_TOOLBAR_CALLBACK': custom_show_toolbar, | |
|
242 | 'HIDE_DJANGO_SQL': False, | |
|
243 | 227 | 'ENABLE_STACKTRACES': True, |
|
228 | 'SHOW_TOOLBAR_CALLBACK': 'neboard.settings.custom_show_toolbar', | |
|
244 | 229 | } |
|
245 | 230 | |
|
246 | 231 | # FIXME Uncommenting this fails somehow. Need to investigate this |
|
247 | 232 | #DEBUG_TOOLBAR_PANELS += ( |
|
248 | 233 | # 'debug_toolbar.panels.profiling.ProfilingDebugPanel', |
|
249 | 234 | #) |
|
250 | 235 |
General Comments 0
You need to be logged in to leave comments.
Login now