##// END OF EJS Templates
Removed unused django applications from settings
neko259 -
r1595:2bacf0d3 default
parent child Browse files
Show More
@@ -1,232 +1,228 b''
1 1 # Django settings for neboard project.
2 2 import os
3 3
4 4 DEBUG = True
5 5
6 6 ADMINS = (
7 7 # ('Your Name', 'your_email@example.com'),
8 8 ('admin', 'admin@example.com')
9 9 )
10 10
11 11 MANAGERS = ADMINS
12 12
13 13 DATABASES = {
14 14 'default': {
15 15 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
16 16 'NAME': 'database.db', # Or path to database file if using sqlite3.
17 17 'USER': '', # Not used with sqlite3.
18 18 'PASSWORD': '', # Not used with sqlite3.
19 19 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
20 20 'PORT': '', # Set to empty string for default. Not used with sqlite3.
21 21 'CONN_MAX_AGE': None,
22 22 }
23 23 }
24 24
25 25 # Local time zone for this installation. Choices can be found here:
26 26 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
27 27 # although not all choices may be available on all operating systems.
28 28 # In a Windows environment this must be set to your system time zone.
29 29 TIME_ZONE = 'Europe/Kiev'
30 30
31 31 # Language code for this installation. All choices can be found here:
32 32 # http://www.i18nguy.com/unicode/language-identifiers.html
33 33 LANGUAGE_CODE = 'en'
34 34
35 35 SITE_ID = 1
36 36
37 37 # If you set this to False, Django will make some optimizations so as not
38 38 # to load the internationalization machinery.
39 39 USE_I18N = True
40 40
41 41 # If you set this to False, Django will not format dates, numbers and
42 42 # calendars according to the current locale.
43 43 USE_L10N = True
44 44
45 45 # If you set this to False, Django will not use timezone-aware datetimes.
46 46 USE_TZ = True
47 47
48 48 USE_ETAGS = 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 STATICFILES_DIRS = []
70 70
71 71 # List of finder classes that know how to find static files in
72 72 # various locations.
73 73 STATICFILES_FINDERS = (
74 74 'django.contrib.staticfiles.finders.FileSystemFinder',
75 75 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
76 76 )
77 77
78 78 if DEBUG:
79 79 STATICFILES_STORAGE = \
80 80 'django.contrib.staticfiles.storage.StaticFilesStorage'
81 81 else:
82 82 STATICFILES_STORAGE = \
83 83 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'
84 84
85 85 # Make this unique, and don't share it with anybody.
86 86 SECRET_KEY = '@1rc$o(7=tt#kd+4s$u6wchm**z^)4x90)7f6z(i&55@o11*8o'
87 87
88 88 TEMPLATES = [{
89 89 'BACKEND': 'django.template.backends.django.DjangoTemplates',
90 90 'DIRS': ['templates'],
91 91 'OPTIONS': {
92 92 'loaders': [
93 93 ('django.template.loaders.cached.Loader', [
94 94 'django.template.loaders.filesystem.Loader',
95 95 'django.template.loaders.app_directories.Loader',
96 96 ]),
97 97 ],
98 98 'context_processors': [
99 99 'django.template.context_processors.csrf',
100 100 'django.core.context_processors.media',
101 101 'django.core.context_processors.static',
102 102 'django.core.context_processors.request',
103 103 'django.contrib.auth.context_processors.auth',
104 104 'boards.context_processors.user_and_ui_processor',
105 105 ],
106 106 },
107 107 }]
108 108
109 109
110 110 MIDDLEWARE_CLASSES = [
111 111 'django.middleware.http.ConditionalGetMiddleware',
112 112 'django.contrib.sessions.middleware.SessionMiddleware',
113 113 'django.middleware.locale.LocaleMiddleware',
114 114 'django.middleware.common.CommonMiddleware',
115 115 'django.contrib.auth.middleware.AuthenticationMiddleware',
116 'django.contrib.messages.middleware.MessageMiddleware',
117 116 'boards.middlewares.BanMiddleware',
118 117 'boards.middlewares.TimezoneMiddleware',
119 118 ]
120 119
121 120 ROOT_URLCONF = 'neboard.urls'
122 121
123 122 # Python dotted path to the WSGI application used by Django's runserver.
124 123 WSGI_APPLICATION = 'neboard.wsgi.application'
125 124
126 125 INSTALLED_APPS = (
127 126 'django.contrib.auth',
128 127 'django.contrib.contenttypes',
129 128 'django.contrib.sessions',
130 # 'django.contrib.sites',
131 'django.contrib.messages',
132 129 'django.contrib.staticfiles',
133 130 # Uncomment the next line to enable the admin:
134 131 'django.contrib.admin',
135 132 # Uncomment the next line to enable admin documentation:
136 133 # 'django.contrib.admindocs',
137 #'django.contrib.humanize',
138 134
139 135 'debug_toolbar',
140 136
141 137 # Search
142 138 'haystack',
143 139
144 140 'boards',
145 141 )
146 142
147 143 # A sample logging configuration. The only tangible logging
148 144 # performed by this configuration is to send an email to
149 145 # the site admins on every HTTP 500 error when DEBUG=False.
150 146 # See http://docs.djangoproject.com/en/dev/topics/logging for
151 147 # more details on how to customize your logging configuration.
152 148 LOGGING = {
153 149 'version': 1,
154 150 'disable_existing_loggers': False,
155 151 'formatters': {
156 152 'verbose': {
157 153 'format': '%(levelname)s %(asctime)s %(name)s %(process)d %(thread)d %(message)s'
158 154 },
159 155 'simple': {
160 156 'format': '%(levelname)s %(asctime)s [%(name)s] %(message)s'
161 157 },
162 158 },
163 159 'filters': {
164 160 'require_debug_false': {
165 161 '()': 'django.utils.log.RequireDebugFalse'
166 162 }
167 163 },
168 164 'handlers': {
169 165 'console': {
170 166 'level': 'DEBUG',
171 167 'class': 'logging.StreamHandler',
172 168 'formatter': 'simple'
173 169 },
174 170 },
175 171 'loggers': {
176 172 'boards': {
177 173 'handlers': ['console'],
178 174 'level': 'DEBUG',
179 175 }
180 176 },
181 177 }
182 178
183 179 HAYSTACK_CONNECTIONS = {
184 180 'default': {
185 181 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
186 182 'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'),
187 183 },
188 184 }
189 185
190 186 THEMES = [
191 187 ('md', 'Mystic Dark'),
192 188 ('md_centered', 'Mystic Dark (centered)'),
193 189 ('sw', 'Snow White'),
194 190 ('pg', 'Photon Gray'),
195 191 ]
196 192
197 193 IMAGE_VIEWERS = [
198 194 ('simple', 'Simple'),
199 195 ('popup', 'Popup'),
200 196 ]
201 197
202 198 ALLOWED_HOSTS = ['*']
203 199
204 200 POSTING_DELAY = 20 # seconds
205 201
206 202 # Websocket settins
207 203 CENTRIFUGE_HOST = 'localhost'
208 204 CENTRIFUGE_PORT = '9090'
209 205
210 206 CENTRIFUGE_ADDRESS = 'http://{}:{}'.format(CENTRIFUGE_HOST, CENTRIFUGE_PORT)
211 207 CENTRIFUGE_PROJECT_ID = '<project id here>'
212 208 CENTRIFUGE_PROJECT_SECRET = '<project secret here>'
213 209 CENTRIFUGE_TIMEOUT = 5
214 210
215 211 # Debug middlewares
216 212 MIDDLEWARE_CLASSES += [
217 213 'debug_toolbar.middleware.DebugToolbarMiddleware',
218 214 ]
219 215
220 216
221 217 def custom_show_toolbar(request):
222 218 return request.user.has_perm('admin.debug')
223 219
224 220 DEBUG_TOOLBAR_CONFIG = {
225 221 'ENABLE_STACKTRACES': True,
226 222 'SHOW_TOOLBAR_CALLBACK': 'neboard.settings.custom_show_toolbar',
227 223 }
228 224
229 225 # FIXME Uncommenting this fails somehow. Need to investigate this
230 226 #DEBUG_TOOLBAR_PANELS += (
231 227 # 'debug_toolbar.panels.profiling.ProfilingDebugPanel',
232 228 #)
General Comments 0
You need to be logged in to leave comments. Login now