|
1 | 1 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) |
2 | 2 | import os |
| 3 | + |
3 | 4 | BASE_DIR = os.path.dirname(os.path.dirname(__file__)) |
4 | 5 |
|
5 | 6 |
|
6 | | -SECRET_KEY = 'c14d549c574e4d8cf162404ef0b04598' |
| 7 | +SECRET_KEY = "c14d549c574e4d8cf162404ef0b04598" |
7 | 8 |
|
8 | 9 | DEBUG = True |
9 | 10 |
|
10 | 11 | TEMPLATE_DEBUG = False |
11 | 12 |
|
12 | | -ALLOWED_HOSTS = ['*'] |
| 13 | +ALLOWED_HOSTS = ["*"] |
13 | 14 |
|
14 | 15 | # Application definition |
15 | 16 |
|
16 | 17 | INSTALLED_APPS = [ |
17 | | - 'django.contrib.admin', |
18 | | - 'django.contrib.auth', |
19 | | - 'django.contrib.contenttypes', |
20 | | - 'django.contrib.sessions', |
21 | | - 'django.contrib.messages', |
22 | | - 'django.contrib.staticfiles', |
23 | | - 'app', |
24 | | - 'oidc_provider', |
| 18 | + "django.contrib.admin", |
| 19 | + "django.contrib.auth", |
| 20 | + "django.contrib.contenttypes", |
| 21 | + "django.contrib.sessions", |
| 22 | + "django.contrib.messages", |
| 23 | + "django.contrib.staticfiles", |
| 24 | + "app", |
| 25 | + "oidc_provider", |
25 | 26 | ] |
26 | 27 |
|
27 | 28 | MIDDLEWARE_CLASSES = [ |
28 | | - 'django.contrib.sessions.middleware.SessionMiddleware', |
29 | | - 'django.middleware.common.CommonMiddleware', |
30 | | - 'django.middleware.csrf.CsrfViewMiddleware', |
31 | | - 'django.contrib.auth.middleware.AuthenticationMiddleware', |
32 | | - 'django.contrib.messages.middleware.MessageMiddleware', |
33 | | - 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
34 | | - 'oidc_provider.middleware.SessionManagementMiddleware', |
| 29 | + "django.contrib.sessions.middleware.SessionMiddleware", |
| 30 | + "django.middleware.common.CommonMiddleware", |
| 31 | + "django.middleware.csrf.CsrfViewMiddleware", |
| 32 | + "django.contrib.auth.middleware.AuthenticationMiddleware", |
| 33 | + "django.contrib.messages.middleware.MessageMiddleware", |
| 34 | + "django.middleware.clickjacking.XFrameOptionsMiddleware", |
| 35 | + "oidc_provider.middleware.SessionManagementMiddleware", |
35 | 36 | ] |
36 | 37 | MIDDLEWARE = MIDDLEWARE_CLASSES |
37 | 38 |
|
38 | 39 | TEMPLATES = [ |
39 | 40 | { |
40 | | - 'BACKEND': 'django.template.backends.django.DjangoTemplates', |
41 | | - 'DIRS': [], |
42 | | - 'APP_DIRS': True, |
43 | | - 'OPTIONS': { |
44 | | - 'context_processors': [ |
45 | | - 'django.template.context_processors.debug', |
46 | | - 'django.template.context_processors.request', |
47 | | - 'django.contrib.auth.context_processors.auth', |
48 | | - 'django.contrib.messages.context_processors.messages', |
| 41 | + "BACKEND": "django.template.backends.django.DjangoTemplates", |
| 42 | + "DIRS": [], |
| 43 | + "APP_DIRS": True, |
| 44 | + "OPTIONS": { |
| 45 | + "context_processors": [ |
| 46 | + "django.template.context_processors.debug", |
| 47 | + "django.template.context_processors.request", |
| 48 | + "django.contrib.auth.context_processors.auth", |
| 49 | + "django.contrib.messages.context_processors.messages", |
49 | 50 | ], |
50 | 51 | }, |
51 | 52 | }, |
52 | 53 | ] |
53 | 54 |
|
54 | | -ROOT_URLCONF = 'app.urls' |
| 55 | +ROOT_URLCONF = "app.urls" |
55 | 56 |
|
56 | | -WSGI_APPLICATION = 'app.wsgi.application' |
| 57 | +WSGI_APPLICATION = "app.wsgi.application" |
57 | 58 |
|
58 | 59 | # Database |
59 | 60 |
|
60 | 61 | DATABASES = { |
61 | | - 'default': { |
62 | | - 'ENGINE': 'django.db.backends.sqlite3', |
63 | | - 'NAME': os.path.join(BASE_DIR, 'DATABASE.sqlite3'), |
| 62 | + "default": { |
| 63 | + "ENGINE": "django.db.backends.sqlite3", |
| 64 | + "NAME": os.path.join(BASE_DIR, "DATABASE.sqlite3"), |
64 | 65 | } |
65 | 66 | } |
66 | 67 |
|
67 | 68 | # Internationalization |
68 | 69 |
|
69 | | -LANGUAGE_CODE = 'en-us' |
| 70 | +LANGUAGE_CODE = "en-us" |
70 | 71 |
|
71 | | -TIME_ZONE = 'UTC' |
| 72 | +TIME_ZONE = "UTC" |
72 | 73 |
|
73 | 74 | USE_I18N = True |
74 | 75 |
|
|
78 | 79 |
|
79 | 80 | # Static files (CSS, JavaScript, Images) |
80 | 81 |
|
81 | | -STATIC_URL = '/static/' |
82 | | -STATIC_ROOT = os.path.join(BASE_DIR, 'static/') |
| 82 | +STATIC_URL = "/static/" |
| 83 | +STATIC_ROOT = os.path.join(BASE_DIR, "static/") |
83 | 84 |
|
84 | 85 | # Custom settings |
85 | 86 |
|
86 | | -LOGIN_REDIRECT_URL = '/' |
| 87 | +LOGIN_REDIRECT_URL = "/" |
87 | 88 |
|
88 | 89 | # OIDC Provider settings |
89 | 90 |
|
90 | | -SITE_URL = 'http://localhost:8000' |
| 91 | +SITE_URL = "http://localhost:8000" |
91 | 92 | OIDC_SESSION_MANAGEMENT_ENABLE = True |
0 commit comments