|
6 | 6 | from django.utils.translation import ugettext_lazy as _
|
7 | 7 | from .secrets import *
|
8 | 8 |
|
| 9 | +###################### |
| 10 | +# MEZZANINE SETTINGS # |
| 11 | +###################### |
| 12 | + |
| 13 | +# The following settings are already defined with default values in |
| 14 | +# the ``defaults.py`` module within each of Mezzanine's apps, but are |
| 15 | +# common enough to be put here, commented out, for conveniently |
| 16 | +# overriding. Please consult the settings documentation for a full list |
| 17 | +# of settings Mezzanine implements: |
| 18 | +# http://mezzanine.jupo.org/docs/configuration.html#default-settings |
| 19 | + |
| 20 | +# Controls the ordering and grouping of the admin menu. |
| 21 | +# |
| 22 | +# ADMIN_MENU_ORDER = ( |
| 23 | +# ("Content", ("pages.Page", "blog.BlogPost", |
| 24 | +# "generic.ThreadedComment", (_("Media Library"), "media-library"),)), |
| 25 | +# ("Site", ("sites.Site", "redirects.Redirect", "conf.Setting")), |
| 26 | +# ("Users", ("auth.User", "auth.Group",)), |
| 27 | +# ) |
| 28 | + |
| 29 | +# A three item sequence, each containing a sequence of template tags |
| 30 | +# used to render the admin dashboard. |
| 31 | +# |
| 32 | +# DASHBOARD_TAGS = ( |
| 33 | +# ("blog_tags.quick_blog", "mezzanine_tags.app_list"), |
| 34 | +# ("comment_tags.recent_comments",), |
| 35 | +# ("mezzanine_tags.recent_actions",), |
| 36 | +# ) |
| 37 | + |
| 38 | +# A sequence of templates used by the ``page_menu`` template tag. Each |
| 39 | +# item in the sequence is a three item sequence, containing a unique ID |
| 40 | +# for the template, a label for the template, and the template path. |
| 41 | +# These templates are then available for selection when editing which |
| 42 | +# menus a page should appear in. Note that if a menu template is used |
| 43 | +# that doesn't appear in this setting, all pages will appear in it. |
| 44 | + |
| 45 | +# PAGE_MENU_TEMPLATES = ( |
| 46 | +# (1, _("Top navigation bar"), "pages/menus/dropdown.html"), |
| 47 | +# (2, _("Left-hand tree"), "pages/menus/tree.html"), |
| 48 | +# (3, _("Footer"), "pages/menus/footer.html"), |
| 49 | +# ) |
| 50 | + |
| 51 | +# A sequence of fields that will be injected into Mezzanine's (or any |
| 52 | +# library's) models. Each item in the sequence is a four item sequence. |
| 53 | +# The first two items are the dotted path to the model and its field |
| 54 | +# name to be added, and the dotted path to the field class to use for |
| 55 | +# the field. The third and fourth items are a sequence of positional |
| 56 | +# args and a dictionary of keyword args, to use when creating the |
| 57 | +# field instance. When specifying the field class, the path |
| 58 | +# ``django.models.db.`` can be omitted for regular Django model fields. |
| 59 | +# |
| 60 | +# EXTRA_MODEL_FIELDS = ( |
| 61 | +# ( |
| 62 | +# # Dotted path to field. |
| 63 | +# "mezzanine.blog.models.BlogPost.image", |
| 64 | +# # Dotted path to field class. |
| 65 | +# "somelib.fields.ImageField", |
| 66 | +# # Positional args for field class. |
| 67 | +# (_("Image"),), |
| 68 | +# # Keyword args for field class. |
| 69 | +# {"blank": True, "upload_to": "blog"}, |
| 70 | +# ), |
| 71 | +# # Example of adding a field to *all* of Mezzanine's content types: |
| 72 | +# ( |
| 73 | +# "mezzanine.pages.models.Page.another_field", |
| 74 | +# "IntegerField", # 'django.db.models.' is implied if path is omitted. |
| 75 | +# (_("Another name"),), |
| 76 | +# {"blank": True, "default": 1}, |
| 77 | +# ), |
| 78 | +# ) |
| 79 | + |
| 80 | +# Setting to turn on featured images for blog posts. Defaults to False. |
| 81 | +# |
| 82 | +# BLOG_USE_FEATURED_IMAGE = True |
9 | 83 |
|
10 | 84 | # If True, the django-modeltranslation will be added to the
|
11 | 85 | # INSTALLED_APPS setting.
|
12 | 86 | USE_MODELTRANSLATION = False
|
13 | 87 |
|
14 |
| -BLOG_USE_FEATURED_IMAGE = True |
15 |
| -BLOG_USE_LIKE = True |
16 |
| - |
17 |
| - |
18 |
| -ADMIN_HEADER_TITLE = 'Python Ghana' |
19 |
| -GRAPPELLI_ADMIN_TITLE = 'PYTHON GHANA (PyGhana)' |
20 | 88 |
|
21 | 89 | ########################
|
22 | 90 | # MAIN DJANGO SETTINGS #
|
23 | 91 | ########################
|
24 | 92 |
|
25 | 93 | # Hosts/domain names that are valid for this site; required if DEBUG is False
|
26 | 94 | # See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
27 |
| -ALLOWED_HOSTS = ['*'] |
| 95 | +ALLOWED_HOSTS = ["*"] |
28 | 96 |
|
29 | 97 | # Local time zone for this installation. Choices can be found here:
|
30 | 98 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
|
33 | 101 | # timezone as the operating system.
|
34 | 102 | # If running in a Windows environment this must be set to the same as your
|
35 | 103 | # system time zone.
|
36 |
| -TIME_ZONE = 'UTC' |
| 104 | +TIME_ZONE = 'Africa/Accra' |
37 | 105 |
|
38 | 106 | # If you set this to True, Django will use timezone-aware datetimes.
|
39 | 107 | USE_TZ = True
|
|
50 | 118 | # A boolean that turns on/off debug mode. When set to ``True``, stack traces
|
51 | 119 | # are displayed for error pages. Should always be set to ``False`` in
|
52 | 120 | # production. Best set to ``True`` in local_settings.py
|
53 |
| -DEBUG = True |
| 121 | +DEBUG = False |
54 | 122 |
|
55 | 123 | # Whether a user's session cookie expires when the Web browser is closed.
|
56 | 124 | SESSION_EXPIRE_AT_BROWSER_CLOSE = True
|
57 | 125 |
|
58 | 126 | SITE_ID = 1
|
59 | 127 |
|
60 |
| - |
61 |
| -ANONYMOUS_USER_ID = -1 |
62 |
| - |
63 | 128 | # If you set this to False, Django will make some optimizations so as not
|
64 | 129 | # to load the internationalization machinery.
|
65 | 130 | USE_I18N = False
|
|
71 | 136 | FILE_UPLOAD_PERMISSIONS = 0o644
|
72 | 137 |
|
73 | 138 |
|
74 |
| - |
75 |
| - |
76 |
| - |
77 |
| - |
78 |
| -#################################################################################################################################### |
79 | 139 | #############
|
80 | 140 | # DATABASES #
|
81 | 141 | #############
|
82 |
| - #DON'T FORGET TO REMOVE THE # SIGNS BELOW TO ACTIVATE THE DATABASE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
83 |
| - |
84 |
| -# check local_settings.py |
85 |
| - |
86 |
| -################################################################################################################################### |
87 | 142 |
|
| 143 | +DATABASES = { |
| 144 | + "default": { |
| 145 | + # Add "postgresql_psycopg2", "mysql", "sqlite3" or "oracle". |
| 146 | + "ENGINE": "django.db.backends.", |
| 147 | + # DB name or path to database file if using sqlite3. |
| 148 | + "NAME": "", |
| 149 | + # Not used with sqlite3. |
| 150 | + "USER": "", |
| 151 | + # Not used with sqlite3. |
| 152 | + "PASSWORD": "", |
| 153 | + # Set to empty string for localhost. Not used with sqlite3. |
| 154 | + "HOST": "", |
| 155 | + # Set to empty string for default. Not used with sqlite3. |
| 156 | + "PORT": "", |
| 157 | + } |
| 158 | +} |
88 | 159 |
|
89 | 160 |
|
90 | 161 | #########
|
|
111 | 182 | # Example: "/home/media/media.lawrence.com/static/"
|
112 | 183 | STATIC_ROOT = os.path.join(PROJECT_ROOT, STATIC_URL.strip("/"))
|
113 | 184 |
|
114 |
| - |
115 |
| -# List of finder classes that know how to find static files in |
116 |
| -# various locations. |
117 |
| -STATICFILES_FINDERS = ( |
118 |
| - 'django.contrib.staticfiles.finders.FileSystemFinder', |
119 |
| - 'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
120 |
| - 'djangobower.finders.BowerFinder', |
121 |
| -) |
122 |
| - |
123 |
| - |
124 | 185 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
125 | 186 | # trailing slash.
|
126 | 187 | # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
|
|
139 | 200 | "DIRS": [
|
140 | 201 | os.path.join(PROJECT_ROOT, "templates")
|
141 | 202 | ],
|
142 |
| - "APP_DIRS": True, |
143 | 203 | "OPTIONS": {
|
144 | 204 | "context_processors": [
|
145 | 205 | "django.contrib.auth.context_processors.auth",
|
|
156 | 216 | "builtins": [
|
157 | 217 | "mezzanine.template.loader_tags",
|
158 | 218 | ],
|
| 219 | + "loaders": [ |
| 220 | + "mezzanine.template.loaders.host_themes.Loader", |
| 221 | + "django.template.loaders.filesystem.Loader", |
| 222 | + "django.template.loaders.app_directories.Loader", |
| 223 | + ] |
159 | 224 | },
|
160 | 225 | },
|
161 | 226 | ]
|
|
164 | 229 | del TEMPLATES[0]["OPTIONS"]["builtins"]
|
165 | 230 |
|
166 | 231 |
|
167 |
| - |
168 |
| -# Setting to turn on featured images for blog posts. Defaults to False. |
169 |
| -# |
170 |
| - |
171 |
| - |
172 |
| -FORMS_USE_HTML5 = True |
173 | 232 | ################
|
174 | 233 | # APPLICATIONS #
|
175 | 234 | ################
|
176 | 235 |
|
177 | 236 | INSTALLED_APPS = (
|
178 |
| - 'django.contrib.messages', |
| 237 | + 'django.contrib.messages', |
179 | 238 | 'django.contrib.humanize',
|
180 | 239 | "django.contrib.admin",
|
181 | 240 | "django.contrib.auth",
|
|
208 | 267 | "home",
|
209 | 268 | 'djangobower',
|
210 | 269 | "events",
|
211 |
| - |
212 | 270 | )
|
213 | 271 |
|
214 | 272 | # List of middleware classes to use. Order is important; in the request phase,
|
215 | 273 | # these middleware classes will be applied in the order given, and in the
|
216 | 274 | # response phase the middleware will be applied in reverse order.
|
217 |
| -MIDDLEWARE_CLASSES = ( |
| 275 | +MIDDLEWARE = ( |
218 | 276 | "mezzanine.core.middleware.UpdateCacheMiddleware",
|
219 | 277 |
|
220 | 278 | 'django.contrib.sessions.middleware.SessionMiddleware',
|
|
229 | 287 |
|
230 | 288 | "mezzanine.core.request.CurrentRequestMiddleware",
|
231 | 289 | "mezzanine.core.middleware.RedirectFallbackMiddleware",
|
232 |
| - "mezzanine.core.middleware.TemplateForDeviceMiddleware", |
233 |
| - "mezzanine.core.middleware.TemplateForHostMiddleware", |
234 | 290 | "mezzanine.core.middleware.AdminLoginInterfaceSelectorMiddleware",
|
235 | 291 | "mezzanine.core.middleware.SitePermissionMiddleware",
|
236 | 292 | "mezzanine.pages.middleware.PageMiddleware",
|
237 | 293 | "mezzanine.core.middleware.FetchFromCacheMiddleware",
|
238 | 294 | )
|
239 | 295 |
|
| 296 | +if DJANGO_VERSION < (1, 10): |
| 297 | + MIDDLEWARE_CLASSES = MIDDLEWARE |
| 298 | + del MIDDLEWARE |
| 299 | + |
| 300 | + |
240 | 301 | # Store these package names here as they may change in the future since
|
241 | 302 | # at the moment we are using custom forks of them.
|
242 | 303 | PACKAGE_NAME_FILEBROWSER = "filebrowser_safe"
|
|
246 | 307 | # OPTIONAL APPLICATIONS #
|
247 | 308 | #########################
|
248 | 309 |
|
249 |
| -BOWER_COMPONENTS_ROOT = '/PROJECT_ROOT/components/' |
250 |
| - |
251 |
| -BOWER_INSTALLED_APPS = ( |
252 |
| - 'jquery', |
253 |
| - 'jquery-ui', |
254 |
| - 'bootstrap', |
255 |
| - 'fullcalendar' |
256 |
| -) |
257 |
| - |
258 |
| - |
259 | 310 | # These will be added to ``INSTALLED_APPS``, only if available.
|
260 | 311 | OPTIONAL_APPS = (
|
| 312 | + "debug_toolbar", |
261 | 313 | "django_extensions",
|
262 | 314 | "compressor",
|
263 | 315 | PACKAGE_NAME_FILEBROWSER,
|
264 | 316 | PACKAGE_NAME_GRAPPELLI,
|
265 | 317 | )
|
266 | 318 |
|
| 319 | + |
| 320 | +BOWER_COMPONENTS_ROOT = '/PROJECT_ROOT/components/' |
| 321 | + |
| 322 | +BOWER_INSTALLED_APPS = ( |
| 323 | + 'jquery', |
| 324 | + 'jquery-ui', |
| 325 | + 'bootstrap', |
| 326 | + 'fullcalendar' |
| 327 | +) |
267 | 328 | ##################
|
268 | 329 | # LOCAL SETTINGS #
|
269 | 330 | ##################
|
|
287 | 348 | exec(open(f, "rb").read())
|
288 | 349 |
|
289 | 350 |
|
290 |
| - |
291 |
| - |
292 |
| - |
293 |
| - |
294 |
| - |
295 | 351 | ####################
|
296 | 352 | # DYNAMIC SETTINGS #
|
297 | 353 | ####################
|
|
0 commit comments