Show More
@@ -1,28 +1,37 | |||||
1 | # 1.5 Aker # |
|
1 | # 1.5 Aker # | |
2 | * Saving image previews size. No space will be shown below images in some |
|
2 | * Saving image previews size. No space will be shown below images in some | |
3 | styles. |
|
3 | styles. | |
4 | * Showing notification in page title when new posts are loaded into the open |
|
4 | * Showing notification in page title when new posts are loaded into the open | |
5 | thread. |
|
5 | thread. | |
6 | * Thread moderation fixes |
|
6 | * Thread moderation fixes | |
7 | * Added new gallery with search links and image metadata |
|
7 | * Added new gallery with search links and image metadata | |
8 |
|
8 | |||
9 | # 1.6 Amon # |
|
9 | # 1.6 Amon # | |
10 | * Deleted threads are moved to archive instead of permanent delete |
|
10 | * Deleted threads are moved to archive instead of permanent delete | |
11 | * User management fixes and optimizations |
|
11 | * User management fixes and optimizations | |
12 | * Markdown fixes |
|
12 | * Markdown fixes | |
13 | * Pagination changes. Pages counter now starts from 1 instead of 0 |
|
13 | * Pagination changes. Pages counter now starts from 1 instead of 0 | |
14 | * Added API for viewing threads and posts |
|
14 | * Added API for viewing threads and posts | |
15 | * New tag popularity algorithm |
|
15 | * New tag popularity algorithm | |
16 | * Tags list page changes. Now tags list is more like a tag cloud |
|
16 | * Tags list page changes. Now tags list is more like a tag cloud | |
17 |
|
17 | |||
18 | # 1.7 Anubis |
|
18 | # 1.7 Anubis | |
19 | * [ADMIN] Added admin page for post editing, capable of adding and removing tags |
|
19 | * [ADMIN] Added admin page for post editing, capable of adding and removing tags | |
20 | * [CODE] Post view unification |
|
20 | * [CODE] Post view unification | |
21 | * Post caching instead of thread caching |
|
21 | * Post caching instead of thread caching | |
22 | * Simplified tag list page |
|
22 | * Simplified tag list page | |
23 | * [API] Added api for thread update in json |
|
23 | * [API] Added api for thread update in json | |
24 | * Image duplicate check |
|
24 | * Image duplicate check | |
25 | * Posting over ajax (no page reload now) |
|
25 | * Posting over ajax (no page reload now) | |
26 | * Update last update time with thread update |
|
26 | * Update last update time with thread update | |
27 | * Added z-index to the images to move the dragged image to front |
|
27 | * Added z-index to the images to move the dragged image to front | |
28 | * [CODE] Major view refactoring. Now almost all views are class-based |
|
28 | * [CODE] Major view refactoring. Now almost all views are class-based | |
|
29 | ||||
|
30 | # 1.8 Kara | |||
|
31 | * [CODE] Removed thread update logging | |||
|
32 | * [CODE] Refactored compact form. Now it uses the same one form and moves | |||
|
33 | elements instead of swapping them | |||
|
34 | * [CODE] Moved image to a separate model. This will allow to add multiple | |||
|
35 | images to a post | |||
|
36 | * Added search over posts and tags | |||
|
37 | * [ADMIN] Command to remove empty users |
@@ -1,276 +1,276 | |||||
1 | # Django settings for neboard project. |
|
1 | # Django settings for neboard project. | |
2 | import os |
|
2 | import os | |
3 | from boards.mdx_neboard import markdown_extended |
|
3 | from boards.mdx_neboard import markdown_extended | |
4 |
|
4 | |||
5 | DEBUG = True |
|
5 | DEBUG = True | |
6 | TEMPLATE_DEBUG = DEBUG |
|
6 | TEMPLATE_DEBUG = DEBUG | |
7 |
|
7 | |||
8 | ADMINS = ( |
|
8 | ADMINS = ( | |
9 | # ('Your Name', 'your_email@example.com'), |
|
9 | # ('Your Name', 'your_email@example.com'), | |
10 | ('admin', 'admin@example.com') |
|
10 | ('admin', 'admin@example.com') | |
11 | ) |
|
11 | ) | |
12 |
|
12 | |||
13 | MANAGERS = ADMINS |
|
13 | MANAGERS = ADMINS | |
14 |
|
14 | |||
15 | DATABASES = { |
|
15 | DATABASES = { | |
16 | 'default': { |
|
16 | 'default': { | |
17 | 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
|
17 | 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. | |
18 | 'NAME': 'database.db', # Or path to database file if using sqlite3. |
|
18 | 'NAME': 'database.db', # Or path to database file if using sqlite3. | |
19 | 'USER': '', # Not used with sqlite3. |
|
19 | 'USER': '', # Not used with sqlite3. | |
20 | 'PASSWORD': '', # Not used with sqlite3. |
|
20 | 'PASSWORD': '', # Not used with sqlite3. | |
21 | 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
|
21 | 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. | |
22 | 'PORT': '', # Set to empty string for default. Not used with sqlite3. |
|
22 | 'PORT': '', # Set to empty string for default. Not used with sqlite3. | |
23 | 'CONN_MAX_AGE': None, |
|
23 | 'CONN_MAX_AGE': None, | |
24 | } |
|
24 | } | |
25 | } |
|
25 | } | |
26 |
|
26 | |||
27 | # Local time zone for this installation. Choices can be found here: |
|
27 | # Local time zone for this installation. Choices can be found here: | |
28 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
|
28 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name | |
29 | # although not all choices may be available on all operating systems. |
|
29 | # although not all choices may be available on all operating systems. | |
30 | # In a Windows environment this must be set to your system time zone. |
|
30 | # In a Windows environment this must be set to your system time zone. | |
31 | TIME_ZONE = 'Europe/Kiev' |
|
31 | TIME_ZONE = 'Europe/Kiev' | |
32 |
|
32 | |||
33 | # Language code for this installation. All choices can be found here: |
|
33 | # Language code for this installation. All choices can be found here: | |
34 | # http://www.i18nguy.com/unicode/language-identifiers.html |
|
34 | # http://www.i18nguy.com/unicode/language-identifiers.html | |
35 | LANGUAGE_CODE = 'en' |
|
35 | LANGUAGE_CODE = 'en' | |
36 |
|
36 | |||
37 | SITE_ID = 1 |
|
37 | SITE_ID = 1 | |
38 |
|
38 | |||
39 | # If you set this to False, Django will make some optimizations so as not |
|
39 | # If you set this to False, Django will make some optimizations so as not | |
40 | # to load the internationalization machinery. |
|
40 | # to load the internationalization machinery. | |
41 | USE_I18N = True |
|
41 | USE_I18N = True | |
42 |
|
42 | |||
43 | # If you set this to False, Django will not format dates, numbers and |
|
43 | # If you set this to False, Django will not format dates, numbers and | |
44 | # calendars according to the current locale. |
|
44 | # calendars according to the current locale. | |
45 | USE_L10N = True |
|
45 | USE_L10N = True | |
46 |
|
46 | |||
47 | # If you set this to False, Django will not use timezone-aware datetimes. |
|
47 | # If you set this to False, Django will not use timezone-aware datetimes. | |
48 | USE_TZ = True |
|
48 | USE_TZ = True | |
49 |
|
49 | |||
50 | # Absolute filesystem path to the directory that will hold user-uploaded files. |
|
50 | # Absolute filesystem path to the directory that will hold user-uploaded files. | |
51 | # Example: "/home/media/media.lawrence.com/media/" |
|
51 | # Example: "/home/media/media.lawrence.com/media/" | |
52 | MEDIA_ROOT = './media/' |
|
52 | MEDIA_ROOT = './media/' | |
53 |
|
53 | |||
54 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
54 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a | |
55 | # trailing slash. |
|
55 | # trailing slash. | |
56 | # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" |
|
56 | # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" | |
57 | MEDIA_URL = '/media/' |
|
57 | MEDIA_URL = '/media/' | |
58 |
|
58 | |||
59 | # Absolute path to the directory static files should be collected to. |
|
59 | # Absolute path to the directory static files should be collected to. | |
60 | # Don't put anything in this directory yourself; store your static files |
|
60 | # Don't put anything in this directory yourself; store your static files | |
61 | # in apps' "static/" subdirectories and in STATICFILES_DIRS. |
|
61 | # in apps' "static/" subdirectories and in STATICFILES_DIRS. | |
62 | # Example: "/home/media/media.lawrence.com/static/" |
|
62 | # Example: "/home/media/media.lawrence.com/static/" | |
63 | STATIC_ROOT = '' |
|
63 | STATIC_ROOT = '' | |
64 |
|
64 | |||
65 | # URL prefix for static files. |
|
65 | # URL prefix for static files. | |
66 | # Example: "http://media.lawrence.com/static/" |
|
66 | # Example: "http://media.lawrence.com/static/" | |
67 | STATIC_URL = '/static/' |
|
67 | STATIC_URL = '/static/' | |
68 |
|
68 | |||
69 | # Additional locations of static files |
|
69 | # Additional locations of static files | |
70 | # It is really a hack, put real paths, not related |
|
70 | # It is really a hack, put real paths, not related | |
71 | STATICFILES_DIRS = ( |
|
71 | STATICFILES_DIRS = ( | |
72 | os.path.dirname(__file__) + '/boards/static', |
|
72 | os.path.dirname(__file__) + '/boards/static', | |
73 |
|
73 | |||
74 | # '/d/work/python/django/neboard/neboard/boards/static', |
|
74 | # '/d/work/python/django/neboard/neboard/boards/static', | |
75 | # Put strings here, like "/home/html/static" or "C:/www/django/static". |
|
75 | # Put strings here, like "/home/html/static" or "C:/www/django/static". | |
76 | # Always use forward slashes, even on Windows. |
|
76 | # Always use forward slashes, even on Windows. | |
77 | # Don't forget to use absolute paths, not relative paths. |
|
77 | # Don't forget to use absolute paths, not relative paths. | |
78 | ) |
|
78 | ) | |
79 |
|
79 | |||
80 | # List of finder classes that know how to find static files in |
|
80 | # List of finder classes that know how to find static files in | |
81 | # various locations. |
|
81 | # various locations. | |
82 | STATICFILES_FINDERS = ( |
|
82 | STATICFILES_FINDERS = ( | |
83 | 'django.contrib.staticfiles.finders.FileSystemFinder', |
|
83 | 'django.contrib.staticfiles.finders.FileSystemFinder', | |
84 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|
84 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', | |
85 | ) |
|
85 | ) | |
86 |
|
86 | |||
87 | if DEBUG: |
|
87 | if DEBUG: | |
88 | STATICFILES_STORAGE = \ |
|
88 | STATICFILES_STORAGE = \ | |
89 | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
|
89 | 'django.contrib.staticfiles.storage.StaticFilesStorage' | |
90 | else: |
|
90 | else: | |
91 | STATICFILES_STORAGE = \ |
|
91 | STATICFILES_STORAGE = \ | |
92 | 'django.contrib.staticfiles.storage.CachedStaticFilesStorage' |
|
92 | 'django.contrib.staticfiles.storage.CachedStaticFilesStorage' | |
93 |
|
93 | |||
94 | # Make this unique, and don't share it with anybody. |
|
94 | # Make this unique, and don't share it with anybody. | |
95 | SECRET_KEY = '@1rc$o(7=tt#kd+4s$u6wchm**z^)4x90)7f6z(i&55@o11*8o' |
|
95 | SECRET_KEY = '@1rc$o(7=tt#kd+4s$u6wchm**z^)4x90)7f6z(i&55@o11*8o' | |
96 |
|
96 | |||
97 | # List of callables that know how to import templates from various sources. |
|
97 | # List of callables that know how to import templates from various sources. | |
98 | TEMPLATE_LOADERS = ( |
|
98 | TEMPLATE_LOADERS = ( | |
99 | 'django.template.loaders.filesystem.Loader', |
|
99 | 'django.template.loaders.filesystem.Loader', | |
100 | 'django.template.loaders.app_directories.Loader', |
|
100 | 'django.template.loaders.app_directories.Loader', | |
101 | ) |
|
101 | ) | |
102 |
|
102 | |||
103 | TEMPLATE_CONTEXT_PROCESSORS = ( |
|
103 | TEMPLATE_CONTEXT_PROCESSORS = ( | |
104 | 'django.core.context_processors.media', |
|
104 | 'django.core.context_processors.media', | |
105 | 'django.core.context_processors.static', |
|
105 | 'django.core.context_processors.static', | |
106 | 'django.core.context_processors.request', |
|
106 | 'django.core.context_processors.request', | |
107 | 'django.contrib.auth.context_processors.auth', |
|
107 | 'django.contrib.auth.context_processors.auth', | |
108 | 'boards.context_processors.user_and_ui_processor', |
|
108 | 'boards.context_processors.user_and_ui_processor', | |
109 | ) |
|
109 | ) | |
110 |
|
110 | |||
111 | MIDDLEWARE_CLASSES = ( |
|
111 | MIDDLEWARE_CLASSES = ( | |
112 | 'django.contrib.sessions.middleware.SessionMiddleware', |
|
112 | 'django.contrib.sessions.middleware.SessionMiddleware', | |
113 | 'django.middleware.locale.LocaleMiddleware', |
|
113 | 'django.middleware.locale.LocaleMiddleware', | |
114 | 'django.middleware.common.CommonMiddleware', |
|
114 | 'django.middleware.common.CommonMiddleware', | |
115 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
115 | 'django.contrib.auth.middleware.AuthenticationMiddleware', | |
116 | 'django.contrib.messages.middleware.MessageMiddleware', |
|
116 | 'django.contrib.messages.middleware.MessageMiddleware', | |
117 | 'boards.middlewares.BanMiddleware', |
|
117 | 'boards.middlewares.BanMiddleware', | |
118 | 'boards.middlewares.MinifyHTMLMiddleware', |
|
118 | 'boards.middlewares.MinifyHTMLMiddleware', | |
119 | ) |
|
119 | ) | |
120 |
|
120 | |||
121 | ROOT_URLCONF = 'neboard.urls' |
|
121 | ROOT_URLCONF = 'neboard.urls' | |
122 |
|
122 | |||
123 | # Python dotted path to the WSGI application used by Django's runserver. |
|
123 | # Python dotted path to the WSGI application used by Django's runserver. | |
124 | WSGI_APPLICATION = 'neboard.wsgi.application' |
|
124 | WSGI_APPLICATION = 'neboard.wsgi.application' | |
125 |
|
125 | |||
126 | TEMPLATE_DIRS = ( |
|
126 | TEMPLATE_DIRS = ( | |
127 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
|
127 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". | |
128 | # Always use forward slashes, even on Windows. |
|
128 | # Always use forward slashes, even on Windows. | |
129 | # Don't forget to use absolute paths, not relative paths. |
|
129 | # Don't forget to use absolute paths, not relative paths. | |
130 | 'templates', |
|
130 | 'templates', | |
131 | ) |
|
131 | ) | |
132 |
|
132 | |||
133 | INSTALLED_APPS = ( |
|
133 | INSTALLED_APPS = ( | |
134 | 'django.contrib.auth', |
|
134 | 'django.contrib.auth', | |
135 | 'django.contrib.contenttypes', |
|
135 | 'django.contrib.contenttypes', | |
136 | 'django.contrib.sessions', |
|
136 | 'django.contrib.sessions', | |
137 | # 'django.contrib.sites', |
|
137 | # 'django.contrib.sites', | |
138 | 'django.contrib.messages', |
|
138 | 'django.contrib.messages', | |
139 | 'django.contrib.staticfiles', |
|
139 | 'django.contrib.staticfiles', | |
140 | # Uncomment the next line to enable the admin: |
|
140 | # Uncomment the next line to enable the admin: | |
141 | 'django.contrib.admin', |
|
141 | 'django.contrib.admin', | |
142 | # Uncomment the next line to enable admin documentation: |
|
142 | # Uncomment the next line to enable admin documentation: | |
143 | # 'django.contrib.admindocs', |
|
143 | # 'django.contrib.admindocs', | |
144 | 'django.contrib.humanize', |
|
144 | 'django.contrib.humanize', | |
145 | 'django_cleanup', |
|
145 | 'django_cleanup', | |
146 |
|
146 | |||
147 | # Migrations |
|
147 | # Migrations | |
148 | 'south', |
|
148 | 'south', | |
149 | 'debug_toolbar', |
|
149 | 'debug_toolbar', | |
150 |
|
150 | |||
151 | 'captcha', |
|
151 | 'captcha', | |
152 |
|
152 | |||
153 | # Search |
|
153 | # Search | |
154 | 'haystack', |
|
154 | 'haystack', | |
155 |
|
155 | |||
156 | 'boards', |
|
156 | 'boards', | |
157 | ) |
|
157 | ) | |
158 |
|
158 | |||
159 | DEBUG_TOOLBAR_PANELS = ( |
|
159 | DEBUG_TOOLBAR_PANELS = ( | |
160 | 'debug_toolbar.panels.version.VersionDebugPanel', |
|
160 | 'debug_toolbar.panels.version.VersionDebugPanel', | |
161 | 'debug_toolbar.panels.timer.TimerDebugPanel', |
|
161 | 'debug_toolbar.panels.timer.TimerDebugPanel', | |
162 | 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', |
|
162 | 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', | |
163 | 'debug_toolbar.panels.headers.HeaderDebugPanel', |
|
163 | 'debug_toolbar.panels.headers.HeaderDebugPanel', | |
164 | 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', |
|
164 | 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', | |
165 | 'debug_toolbar.panels.template.TemplateDebugPanel', |
|
165 | 'debug_toolbar.panels.template.TemplateDebugPanel', | |
166 | 'debug_toolbar.panels.sql.SQLDebugPanel', |
|
166 | 'debug_toolbar.panels.sql.SQLDebugPanel', | |
167 | 'debug_toolbar.panels.signals.SignalDebugPanel', |
|
167 | 'debug_toolbar.panels.signals.SignalDebugPanel', | |
168 | 'debug_toolbar.panels.logger.LoggingPanel', |
|
168 | 'debug_toolbar.panels.logger.LoggingPanel', | |
169 | ) |
|
169 | ) | |
170 |
|
170 | |||
171 | # TODO: NEED DESIGN FIXES |
|
171 | # TODO: NEED DESIGN FIXES | |
172 | CAPTCHA_OUTPUT_FORMAT = (u' %(hidden_field)s ' |
|
172 | CAPTCHA_OUTPUT_FORMAT = (u' %(hidden_field)s ' | |
173 | u'<div class="form-label">%(image)s</div>' |
|
173 | u'<div class="form-label">%(image)s</div>' | |
174 | u'<div class="form-text">%(text_field)s</div>') |
|
174 | u'<div class="form-text">%(text_field)s</div>') | |
175 |
|
175 | |||
176 | # A sample logging configuration. The only tangible logging |
|
176 | # A sample logging configuration. The only tangible logging | |
177 | # performed by this configuration is to send an email to |
|
177 | # performed by this configuration is to send an email to | |
178 | # the site admins on every HTTP 500 error when DEBUG=False. |
|
178 | # the site admins on every HTTP 500 error when DEBUG=False. | |
179 | # See http://docs.djangoproject.com/en/dev/topics/logging for |
|
179 | # See http://docs.djangoproject.com/en/dev/topics/logging for | |
180 | # more details on how to customize your logging configuration. |
|
180 | # more details on how to customize your logging configuration. | |
181 | LOGGING = { |
|
181 | LOGGING = { | |
182 | 'version': 1, |
|
182 | 'version': 1, | |
183 | 'disable_existing_loggers': False, |
|
183 | 'disable_existing_loggers': False, | |
184 | 'formatters': { |
|
184 | 'formatters': { | |
185 | 'verbose': { |
|
185 | 'verbose': { | |
186 | 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' |
|
186 | 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' | |
187 | }, |
|
187 | }, | |
188 | 'simple': { |
|
188 | 'simple': { | |
189 | 'format': '%(levelname)s %(asctime)s [%(module)s] %(message)s' |
|
189 | 'format': '%(levelname)s %(asctime)s [%(module)s] %(message)s' | |
190 | }, |
|
190 | }, | |
191 | }, |
|
191 | }, | |
192 | 'filters': { |
|
192 | 'filters': { | |
193 | 'require_debug_false': { |
|
193 | 'require_debug_false': { | |
194 | '()': 'django.utils.log.RequireDebugFalse' |
|
194 | '()': 'django.utils.log.RequireDebugFalse' | |
195 | } |
|
195 | } | |
196 | }, |
|
196 | }, | |
197 | 'handlers': { |
|
197 | 'handlers': { | |
198 | 'console': { |
|
198 | 'console': { | |
199 | 'level': 'DEBUG', |
|
199 | 'level': 'DEBUG', | |
200 | 'class': 'logging.StreamHandler', |
|
200 | 'class': 'logging.StreamHandler', | |
201 | 'formatter': 'simple' |
|
201 | 'formatter': 'simple' | |
202 | }, |
|
202 | }, | |
203 | }, |
|
203 | }, | |
204 | 'loggers': { |
|
204 | 'loggers': { | |
205 | 'boards': { |
|
205 | 'boards': { | |
206 | 'handlers': ['console'], |
|
206 | 'handlers': ['console'], | |
207 | 'level': 'DEBUG', |
|
207 | 'level': 'DEBUG', | |
208 | } |
|
208 | } | |
209 | }, |
|
209 | }, | |
210 | } |
|
210 | } | |
211 |
|
211 | |||
212 | HAYSTACK_CONNECTIONS = { |
|
212 | HAYSTACK_CONNECTIONS = { | |
213 | 'default': { |
|
213 | 'default': { | |
214 | 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', |
|
214 | 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', | |
215 | 'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'), |
|
215 | 'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'), | |
216 | }, |
|
216 | }, | |
217 | } |
|
217 | } | |
218 |
|
218 | |||
219 | HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor' |
|
219 | HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor' | |
220 |
|
220 | |||
221 | MARKUP_FIELD_TYPES = ( |
|
221 | MARKUP_FIELD_TYPES = ( | |
222 | ('markdown', markdown_extended), |
|
222 | ('markdown', markdown_extended), | |
223 | ) |
|
223 | ) | |
224 | # Custom imageboard settings |
|
224 | # Custom imageboard settings | |
225 | # TODO These should me moved to |
|
225 | # TODO These should me moved to | |
226 | MAX_POSTS_PER_THREAD = 10 # Thread bumplimit |
|
226 | MAX_POSTS_PER_THREAD = 10 # Thread bumplimit | |
227 | MAX_THREAD_COUNT = 5 # Old threads will be deleted to preserve this count |
|
227 | MAX_THREAD_COUNT = 5 # Old threads will be deleted to preserve this count | |
228 | THREADS_PER_PAGE = 3 |
|
228 | THREADS_PER_PAGE = 3 | |
229 | SITE_NAME = 'Neboard' |
|
229 | SITE_NAME = 'Neboard' | |
230 |
|
230 | |||
231 | THEMES = [ |
|
231 | THEMES = [ | |
232 | ('md', 'Mystic Dark'), |
|
232 | ('md', 'Mystic Dark'), | |
233 | ('md_centered', 'Mystic Dark (centered)'), |
|
233 | ('md_centered', 'Mystic Dark (centered)'), | |
234 | ('sw', 'Snow White'), |
|
234 | ('sw', 'Snow White'), | |
235 | ('pg', 'Photon Gray'), |
|
235 | ('pg', 'Photon Gray'), | |
236 | ] |
|
236 | ] | |
237 |
|
237 | |||
238 | DEFAULT_THEME = 'md' |
|
238 | DEFAULT_THEME = 'md' | |
239 |
|
239 | |||
240 | POPULAR_TAGS = 10 |
|
240 | POPULAR_TAGS = 10 | |
241 | LAST_REPLIES_COUNT = 3 |
|
241 | LAST_REPLIES_COUNT = 3 | |
242 |
|
242 | |||
243 | ENABLE_CAPTCHA = False |
|
243 | ENABLE_CAPTCHA = False | |
244 | # if user tries to post before CAPTCHA_DEFAULT_SAFE_TIME. Captcha will be shown |
|
244 | # if user tries to post before CAPTCHA_DEFAULT_SAFE_TIME. Captcha will be shown | |
245 | CAPTCHA_DEFAULT_SAFE_TIME = 30 # seconds |
|
245 | CAPTCHA_DEFAULT_SAFE_TIME = 30 # seconds | |
246 | POSTING_DELAY = 20 # seconds |
|
246 | POSTING_DELAY = 20 # seconds | |
247 |
|
247 | |||
248 | COMPRESS_HTML = True |
|
248 | COMPRESS_HTML = True | |
249 |
|
249 | |||
250 |
VERSION = '1. |
|
250 | VERSION = '1.8.0 Kara' | |
251 |
|
251 | |||
252 | # Debug mode middlewares |
|
252 | # Debug mode middlewares | |
253 | if DEBUG: |
|
253 | if DEBUG: | |
254 |
|
254 | |||
255 | SITE_NAME += ' DEBUG' |
|
255 | SITE_NAME += ' DEBUG' | |
256 |
|
256 | |||
257 | MIDDLEWARE_CLASSES += ( |
|
257 | MIDDLEWARE_CLASSES += ( | |
258 | 'boards.profiler.ProfilerMiddleware', |
|
258 | 'boards.profiler.ProfilerMiddleware', | |
259 | 'debug_toolbar.middleware.DebugToolbarMiddleware', |
|
259 | 'debug_toolbar.middleware.DebugToolbarMiddleware', | |
260 | ) |
|
260 | ) | |
261 |
|
261 | |||
262 | def custom_show_toolbar(request): |
|
262 | def custom_show_toolbar(request): | |
263 | return DEBUG |
|
263 | return DEBUG | |
264 |
|
264 | |||
265 | DEBUG_TOOLBAR_CONFIG = { |
|
265 | DEBUG_TOOLBAR_CONFIG = { | |
266 | 'INTERCEPT_REDIRECTS': False, |
|
266 | 'INTERCEPT_REDIRECTS': False, | |
267 | 'SHOW_TOOLBAR_CALLBACK': custom_show_toolbar, |
|
267 | 'SHOW_TOOLBAR_CALLBACK': custom_show_toolbar, | |
268 | 'HIDE_DJANGO_SQL': False, |
|
268 | 'HIDE_DJANGO_SQL': False, | |
269 | 'ENABLE_STACKTRACES': True, |
|
269 | 'ENABLE_STACKTRACES': True, | |
270 | } |
|
270 | } | |
271 |
|
271 | |||
272 | # FIXME Uncommenting this fails somehow. Need to investigate this |
|
272 | # FIXME Uncommenting this fails somehow. Need to investigate this | |
273 | #DEBUG_TOOLBAR_PANELS += ( |
|
273 | #DEBUG_TOOLBAR_PANELS += ( | |
274 | # 'debug_toolbar.panels.profiling.ProfilingDebugPanel', |
|
274 | # 'debug_toolbar.panels.profiling.ProfilingDebugPanel', | |
275 | #) |
|
275 | #) | |
276 |
|
276 |
General Comments 0
You need to be logged in to leave comments.
Login now