|
10 | 10 | https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/ |
11 | 11 | """ |
12 | 12 |
|
13 | | -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) |
14 | | -import os |
15 | | -from django.utils.translation import gettext_lazy as _ |
| 13 | +from pathlib import Path |
16 | 14 |
|
17 | | -PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
18 | | -BASE_DIR = os.path.dirname(PROJECT_DIR) |
| 15 | + |
| 16 | +# Build paths inside the project like this: BASE_DIR / "subdir". |
| 17 | +BASE_DIR = Path(__file__).resolve().parent.parent.parent |
19 | 18 |
|
20 | 19 |
|
21 | 20 | # Quick-start development settings - unsuitable for production |
|
70 | 69 | "django.contrib.auth.middleware.AuthenticationMiddleware", |
71 | 70 | "django.middleware.clickjacking.XFrameOptionsMiddleware", |
72 | 71 | "django.middleware.security.SecurityMiddleware", |
73 | | - # Error reporting. Uncomment this to receive emails when a 404 is triggered. |
74 | | - # 'django.middleware.common.BrokenLinkEmailsMiddleware', |
75 | 72 | # CMS functionality |
76 | 73 | "wagtail.contrib.redirects.middleware.RedirectMiddleware", |
77 | 74 | # Fetch from cache. Must be LAST. |
|
105 | 102 | DATABASES = { |
106 | 103 | "default": { |
107 | 104 | "ENGINE": "django.db.backends.sqlite3", |
108 | | - "NAME": os.path.join(BASE_DIR, "db.sqlite3"), |
| 105 | + "NAME": BASE_DIR / "db.sqlite3", |
109 | 106 | } |
110 | 107 | } |
111 | 108 |
|
|
128 | 125 | }, |
129 | 126 | ] |
130 | 127 |
|
| 128 | + |
131 | 129 | # Internationalization |
132 | 130 | # https://docs.djangoproject.com/en/{{ docs_version }}/topics/i18n/ |
133 | 131 |
|
134 | | -# To add or change language of the project, modify the list below. |
135 | 132 | LANGUAGE_CODE = "en-us" |
136 | 133 |
|
137 | | -LANGUAGES = [("en-us", _("English"))] |
138 | | - |
139 | 134 | TIME_ZONE = "America/New_York" |
140 | 135 |
|
141 | | -USE_I18N = True |
| 136 | +USE_I18N = False |
142 | 137 |
|
143 | 138 | USE_TZ = True |
144 | 139 |
|
|
151 | 146 | "django.contrib.staticfiles.finders.AppDirectoriesFinder", |
152 | 147 | ] |
153 | 148 |
|
154 | | -STATIC_ROOT = os.path.join(BASE_DIR, "static") |
| 149 | +STATIC_ROOT = BASE_DIR / "static" |
155 | 150 | STATIC_URL = "/static/" |
156 | 151 |
|
157 | | -MEDIA_ROOT = os.path.join(BASE_DIR, "media") |
| 152 | +MEDIA_ROOT = BASE_DIR / "media" |
158 | 153 | MEDIA_URL = "/media/" |
159 | 154 |
|
160 | 155 |
|
|
170 | 165 |
|
171 | 166 | WAGTAIL_ENABLE_UPDATE_CHECK = False |
172 | 167 |
|
173 | | -WAGTAILSEARCH_BACKENDS = { |
174 | | - "default": { |
175 | | - "BACKEND": "wagtail.search.backends.database", |
176 | | - } |
177 | | -} |
178 | 168 |
|
179 | 169 | # Base URL to use when referring to full URLs within the Wagtail admin backend - |
180 | 170 | # e.g. in notification emails. Don't include '/admin' or a trailing slash |
|
0 commit comments