##// END OF EJS Templates
Made English locale default system-wide. Use client-defined locale. This refs...
neko259 -
r104:4054e4b4 default
parent child Browse files
Show More
@@ -1,198 +1,199 b''
1 1 # Django settings for neboard project.
2 2 import os
3 3 import markdown
4 4 from boards.mdx_neboard import markdown_extended
5 5
6 6 DEBUG = True
7 7 TEMPLATE_DEBUG = DEBUG
8 8
9 9 ADMINS = (
10 10 # ('Your Name', 'your_email@example.com'),
11 11 ('admin', 'admin@example.com')
12 12 )
13 13
14 14 MANAGERS = ADMINS
15 15
16 16 DATABASES = {
17 17 'default': {
18 18 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
19 19 'NAME': 'database.db', # Or path to database file if using sqlite3.
20 20 'USER': '', # Not used with sqlite3.
21 21 'PASSWORD': '', # Not used with sqlite3.
22 22 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
23 23 'PORT': '', # Set to empty string for default. Not used with sqlite3.
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 LANGUAGE_CODE = 'ru-RU'
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 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
86 86 )
87 87
88 88 # Make this unique, and don't share it with anybody.
89 89 SECRET_KEY = '@1rc$o(7=tt#kd+4s$u6wchm**z^)4x90)7f6z(i&55@o11*8o'
90 90
91 91 # List of callables that know how to import templates from various sources.
92 92 TEMPLATE_LOADERS = (
93 93 'django.template.loaders.filesystem.Loader',
94 94 'django.template.loaders.app_directories.Loader',
95 95 # 'django.template.loaders.eggs.Loader',
96 96 )
97 97
98 98 TEMPLATE_CONTEXT_PROCESSORS = (
99 99 'django.core.context_processors.media',
100 100 'django.core.context_processors.static',
101 101 'django.core.context_processors.request',
102 102 'django.contrib.auth.context_processors.auth',
103 103 )
104 104
105 105 MIDDLEWARE_CLASSES = (
106 'django.contrib.sessions.middleware.SessionMiddleware',
107 'django.middleware.locale.LocaleMiddleware',
106 108 'django.middleware.common.CommonMiddleware',
107 'django.contrib.sessions.middleware.SessionMiddleware',
108 109 # 'django.middleware.csrf.CsrfViewMiddleware',
109 110 'django.contrib.auth.middleware.AuthenticationMiddleware',
110 111 'django.contrib.messages.middleware.MessageMiddleware',
111 112 # Uncomment the next line for simple clickjacking protection:
112 113 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
113 114 )
114 115
115 116 ROOT_URLCONF = 'neboard.urls'
116 117
117 118 # Python dotted path to the WSGI application used by Django's runserver.
118 119 WSGI_APPLICATION = 'neboard.wsgi.application'
119 120
120 121 TEMPLATE_DIRS = (
121 122 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
122 123 # Always use forward slashes, even on Windows.
123 124 # Don't forget to use absolute paths, not relative paths.
124 125 'templates',
125 126 )
126 127
127 128 INSTALLED_APPS = (
128 129 'django.contrib.auth',
129 130 'django.contrib.contenttypes',
130 131 'django.contrib.sessions',
131 132 # 'django.contrib.sites',
132 133 'django.contrib.messages',
133 134 'django.contrib.staticfiles',
134 135 # Uncomment the next line to enable the admin:
135 136 'django.contrib.admin',
136 137 # Uncomment the next line to enable admin documentation:
137 138 # 'django.contrib.admindocs',
138 139 'django.contrib.markup',
139 140 'django_cleanup',
140 141 'boards',
141 142 'captcha',
142 143 )
143 144
144 145 # TODO: NEED DESIGN FIXES
145 146 CAPTCHA_OUTPUT_FORMAT = (u' %(hidden_field)s '
146 147 u'<div class="form-label">%(image)s</div>'
147 148 u'<div class="form-text">%(text_field)s</div>')
148 149
149 150 # A sample logging configuration. The only tangible logging
150 151 # performed by this configuration is to send an email to
151 152 # the site admins on every HTTP 500 error when DEBUG=False.
152 153 # See http://docs.djangoproject.com/en/dev/topics/logging for
153 154 # more details on how to customize your logging configuration.
154 155 LOGGING = {
155 156 'version': 1,
156 157 'disable_existing_loggers': False,
157 158 'filters': {
158 159 'require_debug_false': {
159 160 '()': 'django.utils.log.RequireDebugFalse'
160 161 }
161 162 },
162 163 'handlers': {
163 164 'mail_admins': {
164 165 'level': 'ERROR',
165 166 'filters': ['require_debug_false'],
166 167 'class': 'django.utils.log.AdminEmailHandler'
167 168 }
168 169 },
169 170 'loggers': {
170 171 'django.request': {
171 172 'handlers': ['mail_admins'],
172 173 'level': 'ERROR',
173 174 'propagate': True,
174 175 },
175 176 }
176 177 }
177 178
178 179 MARKUP_FIELD_TYPES = (
179 180 ('markdown', markdown_extended),
180 181 )
181 182 # Custom imageboard settings
182 183 MAX_POSTS_PER_THREAD = 10 # Thread bumplimit
183 184 MAX_THREAD_COUNT = 500 # Old threads will be deleted to preserve this count
184 185 THREADS_PER_PAGE = 10
185 186 SITE_NAME = 'Neboard'
186 187
187 188 THEMES = [
188 189 ('md', 'Mystic Dark'),
189 190 ('sw', 'Snow White') ]
190 191
191 192 DEFAULT_THEME = 'md'
192 193
193 194 POPULAR_TAGS = 10
194 195 LAST_REPLIES_COUNT = 3
195 196
196 197 ENABLE_CAPTCHA = True
197 198 # if user tries to post before CAPTCHA_DEFAULT_SAFE_TIME. Captcha will be shown
198 CAPTCHA_DEFAULT_SAFE_TIME = 30 # seconds No newline at end of file
199 CAPTCHA_DEFAULT_SAFE_TIME = 30 # seconds
General Comments 0
You need to be logged in to leave comments. Login now