]>
git.p6c8.net - pcdenotes.git/blob - pcdenotes/settings.py
2 Django settings for pcdenotes project.
4 Generated by 'django-admin startproject' using Django 3.2.11.
6 For more information on this file, see
7 https://docs.djangoproject.com/en/3.2/topics/settings/
9 For the full list of settings and their values, see
10 https://docs.djangoproject.com/en/3.2/ref/settings/
13 from pathlib
import Path
15 from dotenv
import load_dotenv
, find_dotenv
16 load_dotenv(find_dotenv())
20 # Build paths inside the project like this: BASE_DIR / 'subdir'.
21 BASE_DIR
= Path(__file__
).resolve().parent
.parent
24 # Quick-start development settings - unsuitable for production
25 # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
27 # SECURITY WARNING: keep the secret key used in production secret!
28 SECRET_KEY
= str(os
.getenv('PCDENOTES_SECRET_KEY'))
30 # SECURITY WARNING: don't run with debug turned on in production!
31 DEBUG
= str(os
.getenv('PCDENOTES_DEBUG', 'false')).lower() == 'true'
36 # Application definition
39 'django.contrib.admin',
40 'django.contrib.auth',
41 'django.contrib.contenttypes',
42 'django.contrib.sessions',
43 'django.contrib.messages',
44 'django.contrib.staticfiles',
45 'markdownify.apps.MarkdownifyConfig',
50 'django.middleware.security.SecurityMiddleware',
51 'django.contrib.sessions.middleware.SessionMiddleware',
52 'django.middleware.common.CommonMiddleware',
53 'django.middleware.csrf.CsrfViewMiddleware',
54 'django.contrib.auth.middleware.AuthenticationMiddleware',
55 'django.contrib.messages.middleware.MessageMiddleware',
56 'django.middleware.clickjacking.XFrameOptionsMiddleware',
59 ROOT_URLCONF
= 'pcdenotes.urls'
63 'BACKEND': 'django.template.backends.django.DjangoTemplates',
67 'context_processors': [
68 'django.template.context_processors.debug',
69 'django.template.context_processors.request',
70 'django.contrib.auth.context_processors.auth',
71 'django.contrib.messages.context_processors.messages',
77 WSGI_APPLICATION
= 'pcdenotes.wsgi.application'
81 # https://docs.djangoproject.com/en/3.2/ref/settings/#databases
85 'ENGINE': 'django.db.backends.sqlite3',
86 'NAME': BASE_DIR
/ 'db.sqlite3',
92 # https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
94 AUTH_PASSWORD_VALIDATORS
= [
96 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
99 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
102 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
105 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
110 # Internationalization
111 # https://docs.djangoproject.com/en/3.2/topics/i18n/
113 LANGUAGE_CODE
= 'en-us'
124 # Static files (CSS, JavaScript, Images)
125 # https://docs.djangoproject.com/en/3.2/howto/static-files/
127 STATIC_URL
= '/static/'
128 STATIC_ROOT
= BASE_DIR
/ 'static'
130 # Default primary key field type
131 # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
133 DEFAULT_AUTO_FIELD
= 'django.db.models.BigAutoField'
patrick-canterino.de