source: MuiscOrganizationSystem/settings.py

Last change on this file was 59b2e9c, checked in by ManuelTrajcev <manueltrajcev7@…>, 2 weeks ago

querry mostr popular artist per customer for each genre

  • Property mode set to 100644
File size: 3.5 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
76DATABASES = {
77 "default": {
78 # "ENGINE": "django.db.backends.sqlite3",
79 # "NAME": BASE_DIR / "db.sqlite3",
80 'ENGINE': 'django.db.backends.postgresql',
81
82 'NAME': 'chinook',
83
84 'USER': 'postgres',
85
86 'PASSWORD': 'postgres',
87
88 'HOST': 'localhost',
89
90 'PORT': '5432',
91 }
92}
93
94# Password validation
95# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
96
97AUTH_PASSWORD_VALIDATORS = [
98 {
99 "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
100 },
101 {
102 "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
103 },
104 {
105 "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
106 },
107 {
108 "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
109 },
110]
111
112# Internationalization
113# https://docs.djangoproject.com/en/5.1/topics/i18n/
114
115LANGUAGE_CODE = "en-us"
116
117TIME_ZONE = "UTC"
118
119USE_I18N = True
120
121USE_TZ = True
122
123# Static files (CSS, JavaScript, Images)
124# https://docs.djangoproject.com/en/5.1/howto/static-files/
125
126STATIC_URL = "static/"
127
128# Default primary key field type
129# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
130
131DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
Note: See TracBrowser for help on using the repository browser.