Show More
@@ -1,6 +1,5 b'' | |||
|
1 | 1 | # Django settings for neboard project. |
|
2 | 2 | import os |
|
3 | import markdown | |
|
4 | 3 | from boards.mdx_neboard import markdown_extended |
|
5 | 4 | |
|
6 | 5 | DEBUG = True |
@@ -82,7 +81,6 b' STATICFILES_DIRS = (' | |||
|
82 | 81 | STATICFILES_FINDERS = ( |
|
83 | 82 | 'django.contrib.staticfiles.finders.FileSystemFinder', |
|
84 | 83 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|
85 | # 'django.contrib.staticfiles.finders.DefaultStorageFinder', | |
|
86 | 84 | ) |
|
87 | 85 | |
|
88 | 86 | if DEBUG: |
@@ -99,7 +97,6 b" SECRET_KEY = '@1rc$o(7=tt#kd+4s$u6wchm**" | |||
|
99 | 97 | TEMPLATE_LOADERS = ( |
|
100 | 98 | 'django.template.loaders.filesystem.Loader', |
|
101 | 99 | 'django.template.loaders.app_directories.Loader', |
|
102 | # 'django.template.loaders.eggs.Loader', | |
|
103 | 100 | ) |
|
104 | 101 | |
|
105 | 102 | TEMPLATE_CONTEXT_PROCESSORS = ( |
@@ -113,11 +110,8 b' MIDDLEWARE_CLASSES = (' | |||
|
113 | 110 | 'django.contrib.sessions.middleware.SessionMiddleware', |
|
114 | 111 | 'django.middleware.locale.LocaleMiddleware', |
|
115 | 112 | 'django.middleware.common.CommonMiddleware', |
|
116 | # 'django.middleware.csrf.CsrfViewMiddleware', | |
|
117 | 113 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
118 | 114 | 'django.contrib.messages.middleware.MessageMiddleware', |
|
119 | # Uncomment the next line for simple clickjacking protection: | |
|
120 | # 'django.middleware.clickjacking.XFrameOptionsMiddleware' | |
|
121 | 115 | 'boards.middlewares.BanMiddleware', |
|
122 | 116 | ) |
|
123 | 117 | |
@@ -150,6 +144,19 b' INSTALLED_APPS = (' | |||
|
150 | 144 | 'boards', |
|
151 | 145 | 'captcha', |
|
152 | 146 | 'south', |
|
147 | 'debug_toolbar', | |
|
148 | ) | |
|
149 | ||
|
150 | DEBUG_TOOLBAR_PANELS = ( | |
|
151 | 'debug_toolbar.panels.version.VersionDebugPanel', | |
|
152 | 'debug_toolbar.panels.timer.TimerDebugPanel', | |
|
153 | 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', | |
|
154 | 'debug_toolbar.panels.headers.HeaderDebugPanel', | |
|
155 | 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', | |
|
156 | 'debug_toolbar.panels.template.TemplateDebugPanel', | |
|
157 | 'debug_toolbar.panels.sql.SQLDebugPanel', | |
|
158 | 'debug_toolbar.panels.signals.SignalDebugPanel', | |
|
159 | 'debug_toolbar.panels.logger.LoggingPanel', | |
|
153 | 160 | ) |
|
154 | 161 | |
|
155 | 162 | # TODO: NEED DESIGN FIXES |
@@ -190,6 +197,7 b' MARKUP_FIELD_TYPES = (' | |||
|
190 | 197 | ('markdown', markdown_extended), |
|
191 | 198 | ) |
|
192 | 199 | # Custom imageboard settings |
|
200 | # TODO These should me moved to | |
|
193 | 201 | MAX_POSTS_PER_THREAD = 10 # Thread bumplimit |
|
194 | 202 | MAX_THREAD_COUNT = 500 # Old threads will be deleted to preserve this count |
|
195 | 203 | THREADS_PER_PAGE = 10 |
@@ -212,6 +220,20 b' ENABLE_CAPTCHA = False' | |||
|
212 | 220 | CAPTCHA_DEFAULT_SAFE_TIME = 30 # seconds |
|
213 | 221 | POSTING_DELAY = 30 # seconds |
|
214 | 222 | |
|
223 | ||
|
224 | def custom_show_toolbar(request): | |
|
225 | return DEBUG | |
|
226 | ||
|
227 | DEBUG_TOOLBAR_CONFIG = { | |
|
228 | 'INTERCEPT_REDIRECTS': False, | |
|
229 | 'SHOW_TOOLBAR_CALLBACK': custom_show_toolbar, | |
|
230 | 'HIDE_DJANGO_SQL': False, | |
|
231 | 'ENABLE_STACKTRACES': True, | |
|
232 | } | |
|
233 | ||
|
215 | 234 | # Debug mode middlewares |
|
216 | 235 | if DEBUG: |
|
217 | MIDDLEWARE_CLASSES += ('boards.profiler.ProfilerMiddleware',) | |
|
236 | MIDDLEWARE_CLASSES += ( | |
|
237 | 'boards.profiler.ProfilerMiddleware', | |
|
238 | 'debug_toolbar.middleware.DebugToolbarMiddleware', | |
|
239 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now