Coverage for testproject/testproject/settings.py: 100%
18 statements
« prev ^ index » next coverage.py v7.8.0, created at 2025-05-02 11:43 +0700
« prev ^ index » next coverage.py v7.8.0, created at 2025-05-02 11:43 +0700
1"""
2Django settings for testproject project.
4Generated by 'django-admin startproject' using Django 5.1.7.
6For more information on this file, see
7https://docs.djangoproject.com/en/5.1/topics/settings/
9For the full list of settings and their values, see
10https://docs.djangoproject.com/en/5.1/ref/settings/
11"""
13from pathlib import Path
15# Build paths inside the project like this: BASE_DIR / 'subdir'.
16BASE_DIR = Path(__file__).resolve().parent.parent
19# Quick-start development settings - unsuitable for production
20# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
22# SECURITY WARNING: keep the secret key used in production secret!
23SECRET_KEY = "django-insecure-b0f@zba%0!$!%mc$=j2-d)t@3__3xc_4r4#y0-7^h52-0u8k43"
25# SECURITY WARNING: don't run with debug turned on in production!
26DEBUG = True
28ALLOWED_HOSTS = []
31# Application definition
33INSTALLED_APPS = [
34 "django.contrib.admin",
35 "django.contrib.auth",
36 "django.contrib.contenttypes",
37 "django.contrib.sessions",
38 "django.contrib.messages",
39 "django.contrib.staticfiles",
40 "django_audit_log",
41]
43MIDDLEWARE = [
44 "django.middleware.security.SecurityMiddleware",
45 "django.contrib.sessions.middleware.SessionMiddleware",
46 "django.middleware.common.CommonMiddleware",
47 "django.middleware.csrf.CsrfViewMiddleware",
48 "django.contrib.auth.middleware.AuthenticationMiddleware",
49 "django.contrib.messages.middleware.MessageMiddleware",
50 "django.middleware.clickjacking.XFrameOptionsMiddleware",
51 "django_audit_log.middleware.AuditLogMiddleware",
52]
54ROOT_URLCONF = "testproject.urls"
56TEMPLATES = [
57 {
58 "BACKEND": "django.template.backends.django.DjangoTemplates",
59 "DIRS": [],
60 "APP_DIRS": True,
61 "OPTIONS": {
62 "context_processors": [
63 "django.template.context_processors.debug",
64 "django.template.context_processors.request",
65 "django.contrib.auth.context_processors.auth",
66 "django.contrib.messages.context_processors.messages",
67 ],
68 },
69 },
70]
72WSGI_APPLICATION = "testproject.wsgi.application"
75# Database
76# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
78DATABASES = {
79 "default": {
80 "ENGINE": "django.db.backends.sqlite3",
81 "NAME": BASE_DIR / "db.sqlite3",
82 }
83}
86# Password validation
87# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
89AUTH_PASSWORD_VALIDATORS = [
90 {
91 "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
92 },
93 {
94 "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
95 },
96 {
97 "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
98 },
99 {
100 "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
101 },
102]
105# Internationalization
106# https://docs.djangoproject.com/en/5.1/topics/i18n/
108LANGUAGE_CODE = "en-us"
110TIME_ZONE = "UTC"
112USE_I18N = True
114USE_TZ = True
117# Static files (CSS, JavaScript, Images)
118# https://docs.djangoproject.com/en/5.1/howto/static-files/
120STATIC_URL = "static/"
122# Default primary key field type
123# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
125DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"