Show More
@@ -1,6 +1,5 b'' | |||||
1 | # Django settings for neboard project. |
|
1 | # Django settings for neboard project. | |
2 | import os |
|
2 | import os | |
3 | import markdown |
|
|||
4 | from boards.mdx_neboard import markdown_extended |
|
3 | from boards.mdx_neboard import markdown_extended | |
5 |
|
4 | |||
6 | DEBUG = True |
|
5 | DEBUG = True | |
@@ -82,7 +81,6 b' STATICFILES_DIRS = (' | |||||
82 | STATICFILES_FINDERS = ( |
|
81 | STATICFILES_FINDERS = ( | |
83 | 'django.contrib.staticfiles.finders.FileSystemFinder', |
|
82 | 'django.contrib.staticfiles.finders.FileSystemFinder', | |
84 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|
83 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', | |
85 | # 'django.contrib.staticfiles.finders.DefaultStorageFinder', |
|
|||
86 | ) |
|
84 | ) | |
87 |
|
85 | |||
88 | if DEBUG: |
|
86 | if DEBUG: | |
@@ -99,7 +97,6 b" SECRET_KEY = '@1rc$o(7=tt#kd+4s$u6wchm**" | |||||
99 | TEMPLATE_LOADERS = ( |
|
97 | TEMPLATE_LOADERS = ( | |
100 | 'django.template.loaders.filesystem.Loader', |
|
98 | 'django.template.loaders.filesystem.Loader', | |
101 | 'django.template.loaders.app_directories.Loader', |
|
99 | 'django.template.loaders.app_directories.Loader', | |
102 | # 'django.template.loaders.eggs.Loader', |
|
|||
103 | ) |
|
100 | ) | |
104 |
|
101 | |||
105 | TEMPLATE_CONTEXT_PROCESSORS = ( |
|
102 | TEMPLATE_CONTEXT_PROCESSORS = ( | |
@@ -113,11 +110,8 b' MIDDLEWARE_CLASSES = (' | |||||
113 | 'django.contrib.sessions.middleware.SessionMiddleware', |
|
110 | 'django.contrib.sessions.middleware.SessionMiddleware', | |
114 | 'django.middleware.locale.LocaleMiddleware', |
|
111 | 'django.middleware.locale.LocaleMiddleware', | |
115 | 'django.middleware.common.CommonMiddleware', |
|
112 | 'django.middleware.common.CommonMiddleware', | |
116 | # 'django.middleware.csrf.CsrfViewMiddleware', |
|
|||
117 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
113 | 'django.contrib.auth.middleware.AuthenticationMiddleware', | |
118 | 'django.contrib.messages.middleware.MessageMiddleware', |
|
114 | 'django.contrib.messages.middleware.MessageMiddleware', | |
119 | # Uncomment the next line for simple clickjacking protection: |
|
|||
120 | # 'django.middleware.clickjacking.XFrameOptionsMiddleware' |
|
|||
121 | 'boards.middlewares.BanMiddleware', |
|
115 | 'boards.middlewares.BanMiddleware', | |
122 | ) |
|
116 | ) | |
123 |
|
117 | |||
@@ -150,6 +144,19 b' INSTALLED_APPS = (' | |||||
150 | 'boards', |
|
144 | 'boards', | |
151 | 'captcha', |
|
145 | 'captcha', | |
152 | 'south', |
|
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 | # TODO: NEED DESIGN FIXES |
|
162 | # TODO: NEED DESIGN FIXES | |
@@ -190,6 +197,7 b' MARKUP_FIELD_TYPES = (' | |||||
190 | ('markdown', markdown_extended), |
|
197 | ('markdown', markdown_extended), | |
191 | ) |
|
198 | ) | |
192 | # Custom imageboard settings |
|
199 | # Custom imageboard settings | |
|
200 | # TODO These should me moved to | |||
193 | MAX_POSTS_PER_THREAD = 10 # Thread bumplimit |
|
201 | MAX_POSTS_PER_THREAD = 10 # Thread bumplimit | |
194 | MAX_THREAD_COUNT = 500 # Old threads will be deleted to preserve this count |
|
202 | MAX_THREAD_COUNT = 500 # Old threads will be deleted to preserve this count | |
195 | THREADS_PER_PAGE = 10 |
|
203 | THREADS_PER_PAGE = 10 | |
@@ -212,6 +220,20 b' ENABLE_CAPTCHA = False' | |||||
212 | CAPTCHA_DEFAULT_SAFE_TIME = 30 # seconds |
|
220 | CAPTCHA_DEFAULT_SAFE_TIME = 30 # seconds | |
213 | POSTING_DELAY = 30 # seconds |
|
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 | # Debug mode middlewares |
|
234 | # Debug mode middlewares | |
216 | if DEBUG: |
|
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