|
10 | 10 | https://docs.djangoproject.com/en/4.1/ref/settings/
|
11 | 11 | """
|
12 | 12 | import os
|
13 |
| -from pathlib import Path |
| 13 | +import pathlib |
14 | 14 |
|
15 |
| -# Build paths inside the project like this: BASE_DIR / 'subdir'. |
16 |
| -BASE_DIR = Path(__file__).resolve().parent.parent |
| 15 | +# Build paths inside the project like this: BASE_DIR / "subdir". |
| 16 | +BASE_DIR = pathlib.Path(__file__).resolve().parent.parent |
17 | 17 |
|
18 | 18 |
|
19 | 19 | # Quick-start development settings - unsuitable for production
|
|
188 | 188 | # YOUR SETTINGS
|
189 | 189 | "DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
|
190 | 190 | "DEFAULT_AUTHENTICATION_CLASSES": (
|
191 |
| - 'rest_framework.authentication.BasicAuthentication', |
192 |
| - # 'rest_framework.authentication.SessionAuthentication', |
| 191 | + "rest_framework.authentication.BasicAuthentication", |
| 192 | + # "rest_framework.authentication.SessionAuthentication", |
193 | 193 | "rest_framework_simplejwt.authentication.JWTAuthentication",
|
194 | 194 | "dj_rest_auth.jwt_auth.JWTCookieAuthentication",
|
195 | 195 | ),
|
| 196 | + "DEFAULT_VERSIONING_CLASS": "rest_framework.versioning.URLPathVersioning", |
| 197 | + "DEFAULT_VERSION": "2023", |
| 198 | + "ALLOWED_VERSIONS": ["2023", "2024"], |
196 | 199 | }
|
197 | 200 |
|
| 201 | + |
198 | 202 | SPECTACULAR_SETTINGS = {
|
199 | 203 | "TITLE": "pyconkr-api-v2",
|
200 | 204 | "DESCRIPTION": "파이콘 한국 웹서비스용 API (2023 ~ )",
|
|
207 | 211 | "persistAuthorization": True,
|
208 | 212 | "displayOperationId": True,
|
209 | 213 | },
|
210 |
| - # available SwaggerUI versions: https://github.com/swagger-api/swagger-ui/releases |
211 |
| - "SWAGGER_UI_DIST": "//unpkg.com/[email protected]", |
| 214 | + "PREPROCESSING_HOOKS": ["pyconkr.openapi.preprocessing_filter_spec"], |
212 | 215 | }
|
213 | 216 |
|
214 | 217 | # CORS_ALLOW_ALL_ORIGINS = True
|
|
0 commit comments