##// END OF EJS Templates
Bumped version to 1.7.3
neko259 -
r655:34d6f3d5 1.7.3 default
parent child Browse files
Show More
@@ -1,259 +1,259 b''
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 )
108 )
109
109
110 MIDDLEWARE_CLASSES = (
110 MIDDLEWARE_CLASSES = (
111 'django.contrib.sessions.middleware.SessionMiddleware',
111 'django.contrib.sessions.middleware.SessionMiddleware',
112 'django.middleware.locale.LocaleMiddleware',
112 'django.middleware.locale.LocaleMiddleware',
113 'django.middleware.common.CommonMiddleware',
113 'django.middleware.common.CommonMiddleware',
114 'django.contrib.auth.middleware.AuthenticationMiddleware',
114 'django.contrib.auth.middleware.AuthenticationMiddleware',
115 'django.contrib.messages.middleware.MessageMiddleware',
115 'django.contrib.messages.middleware.MessageMiddleware',
116 'boards.middlewares.BanMiddleware',
116 'boards.middlewares.BanMiddleware',
117 'boards.middlewares.MinifyHTMLMiddleware',
117 'boards.middlewares.MinifyHTMLMiddleware',
118 )
118 )
119
119
120 ROOT_URLCONF = 'neboard.urls'
120 ROOT_URLCONF = 'neboard.urls'
121
121
122 # Python dotted path to the WSGI application used by Django's runserver.
122 # Python dotted path to the WSGI application used by Django's runserver.
123 WSGI_APPLICATION = 'neboard.wsgi.application'
123 WSGI_APPLICATION = 'neboard.wsgi.application'
124
124
125 TEMPLATE_DIRS = (
125 TEMPLATE_DIRS = (
126 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
126 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
127 # Always use forward slashes, even on Windows.
127 # Always use forward slashes, even on Windows.
128 # Don't forget to use absolute paths, not relative paths.
128 # Don't forget to use absolute paths, not relative paths.
129 'templates',
129 'templates',
130 )
130 )
131
131
132 INSTALLED_APPS = (
132 INSTALLED_APPS = (
133 'django.contrib.auth',
133 'django.contrib.auth',
134 'django.contrib.contenttypes',
134 'django.contrib.contenttypes',
135 'django.contrib.sessions',
135 'django.contrib.sessions',
136 # 'django.contrib.sites',
136 # 'django.contrib.sites',
137 'django.contrib.messages',
137 'django.contrib.messages',
138 'django.contrib.staticfiles',
138 'django.contrib.staticfiles',
139 # Uncomment the next line to enable the admin:
139 # Uncomment the next line to enable the admin:
140 'django.contrib.admin',
140 'django.contrib.admin',
141 # Uncomment the next line to enable admin documentation:
141 # Uncomment the next line to enable admin documentation:
142 # 'django.contrib.admindocs',
142 # 'django.contrib.admindocs',
143 'django.contrib.humanize',
143 'django.contrib.humanize',
144 'django_cleanup',
144 'django_cleanup',
145 'boards',
145 'boards',
146 'captcha',
146 'captcha',
147 'south',
147 'south',
148 'debug_toolbar',
148 'debug_toolbar',
149 )
149 )
150
150
151 DEBUG_TOOLBAR_PANELS = (
151 DEBUG_TOOLBAR_PANELS = (
152 'debug_toolbar.panels.version.VersionDebugPanel',
152 'debug_toolbar.panels.version.VersionDebugPanel',
153 'debug_toolbar.panels.timer.TimerDebugPanel',
153 'debug_toolbar.panels.timer.TimerDebugPanel',
154 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
154 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
155 'debug_toolbar.panels.headers.HeaderDebugPanel',
155 'debug_toolbar.panels.headers.HeaderDebugPanel',
156 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
156 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
157 'debug_toolbar.panels.template.TemplateDebugPanel',
157 'debug_toolbar.panels.template.TemplateDebugPanel',
158 'debug_toolbar.panels.sql.SQLDebugPanel',
158 'debug_toolbar.panels.sql.SQLDebugPanel',
159 'debug_toolbar.panels.signals.SignalDebugPanel',
159 'debug_toolbar.panels.signals.SignalDebugPanel',
160 'debug_toolbar.panels.logger.LoggingPanel',
160 'debug_toolbar.panels.logger.LoggingPanel',
161 )
161 )
162
162
163 # TODO: NEED DESIGN FIXES
163 # TODO: NEED DESIGN FIXES
164 CAPTCHA_OUTPUT_FORMAT = (u' %(hidden_field)s '
164 CAPTCHA_OUTPUT_FORMAT = (u' %(hidden_field)s '
165 u'<div class="form-label">%(image)s</div>'
165 u'<div class="form-label">%(image)s</div>'
166 u'<div class="form-text">%(text_field)s</div>')
166 u'<div class="form-text">%(text_field)s</div>')
167
167
168 # A sample logging configuration. The only tangible logging
168 # A sample logging configuration. The only tangible logging
169 # performed by this configuration is to send an email to
169 # performed by this configuration is to send an email to
170 # the site admins on every HTTP 500 error when DEBUG=False.
170 # the site admins on every HTTP 500 error when DEBUG=False.
171 # See http://docs.djangoproject.com/en/dev/topics/logging for
171 # See http://docs.djangoproject.com/en/dev/topics/logging for
172 # more details on how to customize your logging configuration.
172 # more details on how to customize your logging configuration.
173 LOGGING = {
173 LOGGING = {
174 'version': 1,
174 'version': 1,
175 'disable_existing_loggers': False,
175 'disable_existing_loggers': False,
176 'formatters': {
176 'formatters': {
177 'verbose': {
177 'verbose': {
178 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
178 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
179 },
179 },
180 'simple': {
180 'simple': {
181 'format': '%(levelname)s %(asctime)s [%(module)s] %(message)s'
181 'format': '%(levelname)s %(asctime)s [%(module)s] %(message)s'
182 },
182 },
183 },
183 },
184 'filters': {
184 'filters': {
185 'require_debug_false': {
185 'require_debug_false': {
186 '()': 'django.utils.log.RequireDebugFalse'
186 '()': 'django.utils.log.RequireDebugFalse'
187 }
187 }
188 },
188 },
189 'handlers': {
189 'handlers': {
190 'console': {
190 'console': {
191 'level': 'DEBUG',
191 'level': 'DEBUG',
192 'class': 'logging.StreamHandler',
192 'class': 'logging.StreamHandler',
193 'formatter': 'simple'
193 'formatter': 'simple'
194 },
194 },
195 },
195 },
196 'loggers': {
196 'loggers': {
197 'boards': {
197 'boards': {
198 'handlers': ['console'],
198 'handlers': ['console'],
199 'level': 'DEBUG',
199 'level': 'DEBUG',
200 }
200 }
201 },
201 },
202 }
202 }
203
203
204 MARKUP_FIELD_TYPES = (
204 MARKUP_FIELD_TYPES = (
205 ('markdown', markdown_extended),
205 ('markdown', markdown_extended),
206 )
206 )
207 # Custom imageboard settings
207 # Custom imageboard settings
208 # TODO These should me moved to
208 # TODO These should me moved to
209 MAX_POSTS_PER_THREAD = 10 # Thread bumplimit
209 MAX_POSTS_PER_THREAD = 10 # Thread bumplimit
210 MAX_THREAD_COUNT = 5 # Old threads will be deleted to preserve this count
210 MAX_THREAD_COUNT = 5 # Old threads will be deleted to preserve this count
211 THREADS_PER_PAGE = 3
211 THREADS_PER_PAGE = 3
212 SITE_NAME = 'Neboard'
212 SITE_NAME = 'Neboard'
213
213
214 THEMES = [
214 THEMES = [
215 ('md', 'Mystic Dark'),
215 ('md', 'Mystic Dark'),
216 ('md_centered', 'Mystic Dark (centered)'),
216 ('md_centered', 'Mystic Dark (centered)'),
217 ('sw', 'Snow White'),
217 ('sw', 'Snow White'),
218 ('pg', 'Photon Gray'),
218 ('pg', 'Photon Gray'),
219 ]
219 ]
220
220
221 DEFAULT_THEME = 'md'
221 DEFAULT_THEME = 'md'
222
222
223 POPULAR_TAGS = 10
223 POPULAR_TAGS = 10
224 LAST_REPLIES_COUNT = 3
224 LAST_REPLIES_COUNT = 3
225
225
226 ENABLE_CAPTCHA = False
226 ENABLE_CAPTCHA = False
227 # if user tries to post before CAPTCHA_DEFAULT_SAFE_TIME. Captcha will be shown
227 # if user tries to post before CAPTCHA_DEFAULT_SAFE_TIME. Captcha will be shown
228 CAPTCHA_DEFAULT_SAFE_TIME = 30 # seconds
228 CAPTCHA_DEFAULT_SAFE_TIME = 30 # seconds
229 POSTING_DELAY = 20 # seconds
229 POSTING_DELAY = 20 # seconds
230
230
231 COMPRESS_HTML = True
231 COMPRESS_HTML = True
232
232
233 VERSION = '1.7.2 Anubis'
233 VERSION = '1.7.3 Anubis'
234
234
235 # Debug mode middlewares
235 # Debug mode middlewares
236 if DEBUG:
236 if DEBUG:
237
237
238 SITE_NAME += ' DEBUG'
238 SITE_NAME += ' DEBUG'
239
239
240 MIDDLEWARE_CLASSES += (
240 MIDDLEWARE_CLASSES += (
241 'boards.profiler.ProfilerMiddleware',
241 'boards.profiler.ProfilerMiddleware',
242 'debug_toolbar.middleware.DebugToolbarMiddleware',
242 'debug_toolbar.middleware.DebugToolbarMiddleware',
243 )
243 )
244
244
245 def custom_show_toolbar(request):
245 def custom_show_toolbar(request):
246 return DEBUG
246 return DEBUG
247
247
248 DEBUG_TOOLBAR_CONFIG = {
248 DEBUG_TOOLBAR_CONFIG = {
249 'INTERCEPT_REDIRECTS': False,
249 'INTERCEPT_REDIRECTS': False,
250 'SHOW_TOOLBAR_CALLBACK': custom_show_toolbar,
250 'SHOW_TOOLBAR_CALLBACK': custom_show_toolbar,
251 'HIDE_DJANGO_SQL': False,
251 'HIDE_DJANGO_SQL': False,
252 'ENABLE_STACKTRACES': True,
252 'ENABLE_STACKTRACES': True,
253 }
253 }
254
254
255 # FIXME Uncommenting this fails somehow. Need to investigate this
255 # FIXME Uncommenting this fails somehow. Need to investigate this
256 #DEBUG_TOOLBAR_PANELS += (
256 #DEBUG_TOOLBAR_PANELS += (
257 # 'debug_toolbar.panels.profiling.ProfilingDebugPanel',
257 # 'debug_toolbar.panels.profiling.ProfilingDebugPanel',
258 #)
258 #)
259
259
General Comments 0
You need to be logged in to leave comments. Login now