|
1 | 1 | """
|
2 | 2 | Django settings for core project.
|
3 | 3 |
|
4 |
| -Generated by 'django-admin startproject' using Django 1.8.2. |
| 4 | +Generated by 'django-admin startproject' using Django 5.1.3. |
5 | 5 |
|
6 | 6 | For more information on this file, see
|
7 |
| -https://docs.djangoproject.com/en/1.8/topics/settings/ |
| 7 | +https://docs.djangoproject.com/en/5.1/topics/settings/ |
8 | 8 |
|
9 | 9 | For the full list of settings and their values, see
|
10 |
| -https://docs.djangoproject.com/en/1.8/ref/settings/ |
| 10 | +https://docs.djangoproject.com/en/5.1/ref/settings/ |
11 | 11 | """
|
12 | 12 |
|
13 | 13 | import os
|
14 | 14 | import time
|
| 15 | +from pathlib import Path |
15 | 16 |
|
| 17 | +# Build paths inside the project like this: BASE_DIR / 'subdir'. |
| 18 | +BASE_DIR = Path(__file__).resolve().parent.parent |
16 | 19 |
|
17 |
| -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
| 20 | +# Quick-start development settings - unsuitable for production |
| 21 | +# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/ |
| 22 | + |
| 23 | +# SECURITY WARNING: keep the secret key used in production secret! |
18 | 24 | SECRET_KEY = "MillisecondsMatter"
|
19 |
| -DEBUG = False |
| 25 | + |
| 26 | +# SECURITY WARNING: don't run with debug turned on in production! |
| 27 | +DEBUG = True |
| 28 | + |
| 29 | +ALLOWED_HOSTS = [] |
20 | 30 |
|
21 | 31 | # Application definition
|
22 |
| -INSTALLED_APPS = ( |
| 32 | + |
| 33 | +INSTALLED_APPS = [ |
23 | 34 | "django.contrib.admin",
|
24 | 35 | "django.contrib.auth",
|
25 | 36 | "django.contrib.contenttypes",
|
|
28 | 39 | "django.contrib.staticfiles",
|
29 | 40 | "algoliasearch_django",
|
30 | 41 | "tests",
|
31 |
| -) |
| 42 | +] |
32 | 43 |
|
33 | 44 | MIDDLEWARE = [
|
34 |
| - "django.contrib.sessions.middleware.SessionMiddleware", |
35 |
| - "django.middleware.common.CommonMiddleware", |
36 |
| - "django.middleware.csrf.CsrfViewMiddleware", |
37 | 45 | "django.contrib.auth.middleware.AuthenticationMiddleware",
|
38 | 46 | "django.contrib.auth.middleware.SessionAuthenticationMiddleware",
|
39 | 47 | "django.contrib.messages.middleware.MessageMiddleware",
|
| 48 | + "django.contrib.sessions.middleware.SessionMiddleware", |
40 | 49 | "django.middleware.clickjacking.XFrameOptionsMiddleware",
|
| 50 | + "django.middleware.common.CommonMiddleware", |
| 51 | + "django.middleware.csrf.CsrfViewMiddleware", |
41 | 52 | "django.middleware.security.SecurityMiddleware",
|
42 | 53 | ]
|
43 | 54 |
|
| 55 | +ROOT_URLCONF = "tests.urls" |
| 56 | + |
44 | 57 | TEMPLATES = [
|
45 | 58 | {
|
46 | 59 | "BACKEND": "django.template.backends.django.DjangoTemplates",
|
|
57 | 70 | },
|
58 | 71 | ]
|
59 | 72 |
|
60 |
| -ROOT_URLCONF = "tests.urls" |
61 |
| - |
62 | 73 | # Database
|
| 74 | +# https://docs.djangoproject.com/en/5.1/ref/settings/#databases |
| 75 | + |
63 | 76 | DATABASES = {
|
64 | 77 | "default": {
|
65 | 78 | "ENGINE": "django.db.backends.sqlite3",
|
66 |
| - "NAME": os.path.join(BASE_DIR, "db.sqlite3"), |
| 79 | + "NAME": BASE_DIR / "db.sqlite3", |
67 | 80 | }
|
68 | 81 | }
|
69 | 82 |
|
70 | 83 | # Internationalization
|
| 84 | +# https://docs.djangoproject.com/en/5.1/topics/i18n/ |
| 85 | + |
71 | 86 | LANGUAGE_CODE = "en-us"
|
| 87 | + |
72 | 88 | TIME_ZONE = "UTC"
|
| 89 | + |
73 | 90 | USE_I18N = True
|
| 91 | + |
74 | 92 | USE_L10N = True
|
| 93 | + |
75 | 94 | USE_TZ = True
|
76 | 95 |
|
| 96 | +# Default primary key field type |
| 97 | +# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field |
| 98 | + |
| 99 | +DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" |
| 100 | + |
77 | 101 |
|
78 | 102 | def safe_index_name(name):
|
79 | 103 | return "{}_ci-{}".format(name, time.time())
|
|
0 commit comments