|
15 | 15 | # Build paths inside the project like this: BASE_DIR / 'subdir'.
|
16 | 16 | BASE_DIR = Path(__file__).resolve().parent.parent
|
17 | 17 |
|
18 |
| - |
19 | 18 | # Quick-start development settings - unsuitable for production
|
20 | 19 | # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
|
21 | 20 |
|
|
24 | 23 |
|
25 | 24 | # SECURITY WARNING: don't run with debug turned on in production!
|
26 | 25 | DEBUG = True
|
27 |
| - |
28 | 26 | ALLOWED_HOSTS = []
|
29 | 27 |
|
30 |
| - |
31 | 28 | # Application definition
|
32 |
| - |
33 | 29 | INSTALLED_APPS = [
|
34 | 30 | "django.contrib.admin",
|
35 | 31 | "django.contrib.auth",
|
|
40 | 36 | "channels", # Websocket library
|
41 | 37 | "test_app", # This test application
|
42 | 38 | ]
|
43 |
| - |
44 | 39 | MIDDLEWARE = [
|
45 | 40 | "django.middleware.security.SecurityMiddleware",
|
46 | 41 | "django.contrib.sessions.middleware.SessionMiddleware",
|
|
50 | 45 | "django.contrib.messages.middleware.MessageMiddleware",
|
51 | 46 | "django.middleware.clickjacking.XFrameOptionsMiddleware",
|
52 | 47 | ]
|
53 |
| - |
54 | 48 | ROOT_URLCONF = "test_app.urls"
|
55 |
| - |
56 | 49 | TEMPLATES = [
|
57 | 50 | {
|
58 | 51 | "BACKEND": "django.template.backends.django.DjangoTemplates",
|
|
68 | 61 | },
|
69 | 62 | },
|
70 | 63 | ]
|
71 |
| - |
72 | 64 | ASGI_APPLICATION = "test_app.asgi.application"
|
73 | 65 |
|
74 |
| - |
75 | 66 | # Database
|
76 | 67 | # https://docs.djangoproject.com/en/3.2/ref/settings/#databases
|
77 |
| - |
78 | 68 | DATABASES = {
|
79 | 69 | "default": {
|
80 | 70 | "ENGINE": "django.db.backends.sqlite3",
|
|
85 | 75 |
|
86 | 76 | # Password validation
|
87 | 77 | # https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
|
88 |
| - |
89 | 78 | AUTH_PASSWORD_VALIDATORS = [
|
90 | 79 | {
|
91 | 80 | "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
|
|
101 | 90 | },
|
102 | 91 | ]
|
103 | 92 |
|
104 |
| - |
105 | 93 | # Internationalization
|
106 | 94 | # https://docs.djangoproject.com/en/3.2/topics/i18n/
|
107 |
| - |
108 | 95 | LANGUAGE_CODE = "en-us"
|
109 |
| - |
110 | 96 | TIME_ZONE = "UTC"
|
111 |
| - |
112 | 97 | USE_I18N = True
|
113 |
| - |
114 | 98 | USE_L10N = True
|
115 |
| - |
116 | 99 | USE_TZ = True
|
117 | 100 |
|
118 | 101 |
|
119 |
| -# Static files (CSS, JavaScript, Images) |
120 |
| -# https://docs.djangoproject.com/en/3.2/howto/static-files/ |
121 |
| - |
122 |
| -STATIC_URL = "/static/" |
123 |
| - |
124 | 102 | # Default primary key field type
|
125 | 103 | # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
|
126 |
| - |
127 | 104 | DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
128 |
| - |
129 | 105 | STATIC_ROOT = os.path.join(BASE_DIR, "static-deploy")
|
130 | 106 |
|
131 | 107 | # Static Files (CSS, JavaScript, Images)
|
| 108 | +# https://docs.djangoproject.com/en/3.2/howto/static-files/ |
| 109 | +STATIC_URL = "/static/" |
132 | 110 | STATICFILES_DIRS = [
|
133 | 111 | os.path.join(BASE_DIR, "test_app", "static"),
|
134 | 112 | ]
|
135 |
| - |
136 | 113 | STATICFILES_FINDERS = [
|
137 | 114 | "django.contrib.staticfiles.finders.FileSystemFinder",
|
138 | 115 | "django.contrib.staticfiles.finders.AppDirectoriesFinder",
|
|
0 commit comments