source: MuiscOrganizationSystem/settings.py@ a2410a9

Last change on this file since a2410a9 was a2410a9, checked in by Manuel <manueltrajcev7@…>, 3 weeks ago

querries complexity update, indices added, columns renamed

  • Property mode set to 100644
File size: 3.9 KB
Line 
1"""
2Django settings for MuiscOrganizationSystem project.
3
4Generated by 'django-admin startproject' using Django 5.1.3.
5
6For more information on this file, see
7https://docs.djangoproject.com/en/5.1/topics/settings/
8
9For the full list of settings and their values, see
10https://docs.djangoproject.com/en/5.1/ref/settings/
11"""
12
13from pathlib import Path
14
15# Build paths inside the project like this: BASE_DIR / 'subdir'.
16BASE_DIR = Path(__file__).resolve().parent.parent
17
18# Quick-start development settings - unsuitable for production
19# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
20
21# SECURITY WARNING: keep the secret key used in production secret!
22SECRET_KEY = "django-insecure-rl(5&kf(ekhmiwh&8+gn&bd_hh#nwuuwhc7obk3-4)iv_17b8_"
23
24# SECURITY WARNING: don't run with debug turned on in production!
25DEBUG = True
26
27ALLOWED_HOSTS = []
28
29# Application definition
30
31INSTALLED_APPS = [
32 "django.contrib.admin",
33 "django.contrib.auth",
34 "django.contrib.contenttypes",
35 "django.contrib.sessions",
36 "django.contrib.messages",
37 "django.contrib.staticfiles",
38 "music"
39]
40
41MIDDLEWARE = [
42 "django.middleware.security.SecurityMiddleware",
43 "django.contrib.sessions.middleware.SessionMiddleware",
44 "django.middleware.common.CommonMiddleware",
45 "django.middleware.csrf.CsrfViewMiddleware",
46 "django.contrib.auth.middleware.AuthenticationMiddleware",
47 "django.contrib.messages.middleware.MessageMiddleware",
48 "django.middleware.clickjacking.XFrameOptionsMiddleware",
49 'music.middleware.Redirect404ToHomeMiddleware',
50]
51
52ROOT_URLCONF = "MuiscOrganizationSystem.urls"
53
54TEMPLATES = [
55 {
56 "BACKEND": "django.template.backends.django.DjangoTemplates",
57 "DIRS": [BASE_DIR / 'templates']
58 ,
59 "APP_DIRS": True,
60 "OPTIONS": {
61 "context_processors": [
62 "django.template.context_processors.debug",
63 "django.template.context_processors.request",
64 "django.contrib.auth.context_processors.auth",
65 "django.contrib.messages.context_processors.messages",
66 ],
67 },
68 },
69]
70
71WSGI_APPLICATION = "MuiscOrganizationSystem.wsgi.application"
72
73# Database
74# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
75
76# REMOTE DM
77DATABASES = {
78 "default": {
79 # "ENGINE": "django.db.backends.sqlite3",
80 # "NAME": BASE_DIR / "db.sqlite3",
81 'ENGINE': 'django.db.backends.postgresql',
82
83 'NAME': 'db_202425z_va_prj_mpms',
84
85 'USER': 'db_202425z_va_prj_mpms_owner',
86
87 'PASSWORD': 'a225db474891',
88
89 'HOST': 'localhost',
90
91 'PORT': '7777',
92 }
93}
94
95# LOCAL DB
96# DATABASES = {
97# "default": {
98# # "ENGINE": "django.db.backends.sqlite3",
99# # "NAME": BASE_DIR / "db.sqlite3",
100# 'ENGINE': 'django.db.backends.postgresql',
101#
102# 'NAME': 'chinook',
103#
104# 'USER': 'postgres',
105#
106# 'PASSWORD': 'postgres',
107#
108# 'HOST': 'localhost',
109#
110# 'PORT': '5432',
111# }
112# }
113
114# Password validation
115# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
116
117AUTH_PASSWORD_VALIDATORS = [
118 {
119 "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
120 },
121 {
122 "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
123 },
124 {
125 "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
126 },
127 {
128 "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
129 },
130]
131
132# Internationalization
133# https://docs.djangoproject.com/en/5.1/topics/i18n/
134
135LANGUAGE_CODE = "en-us"
136
137TIME_ZONE = "UTC"
138
139USE_I18N = True
140
141USE_TZ = True
142
143# Static files (CSS, JavaScript, Images)
144# https://docs.djangoproject.com/en/5.1/howto/static-files/
145
146STATIC_URL = "static/"
147
148# Default primary key field type
149# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
150
151DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
152
153DATA_UPLOAD_MAX_NUMBER_FIELDS = 10000
Note: See TracBrowser for help on using the repository browser.