cineclub-site/server/ulm_cine_club_api/settings.py

128 lines
3.2 KiB
Python
Raw Normal View History

2022-04-03 01:20:53 +02:00
"""
Django settings for ulm_cine_club_api project.
Generated by 'django-admin startproject' using Django 3.2.12.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
2022-04-03 01:20:54 +02:00
SECRET_KEY = "django-insecure-)3^d_7xfyv3#+oz#8rj9tym2=g*n!+-sp#_v!t&h+i0y+gv(8u"
2022-04-03 01:20:53 +02:00
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
2022-04-03 01:20:54 +02:00
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"myapi.apps.MyapiConfig",
"rest_framework",
2022-04-03 01:20:53 +02:00
]
MIDDLEWARE = [
2022-04-03 01:20:54 +02:00
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
2022-04-03 01:20:53 +02:00
]
2022-04-03 01:20:54 +02:00
ROOT_URLCONF = "ulm_cine_club_api.urls"
2022-04-03 01:20:53 +02:00
TEMPLATES = [
{
2022-04-03 01:20:54 +02:00
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
2022-04-03 01:20:53 +02:00
],
},
},
]
2022-04-03 01:20:54 +02:00
WSGI_APPLICATION = "ulm_cine_club_api.wsgi.application"
2022-04-03 01:20:53 +02:00
# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
DATABASES = {
2022-04-03 01:20:54 +02:00
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
2022-04-03 01:20:53 +02:00
}
}
# Password validation
# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
2022-04-03 01:20:54 +02:00
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
2022-04-03 01:20:53 +02:00
},
{
2022-04-03 01:20:54 +02:00
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
2022-04-03 01:20:53 +02:00
},
{
2022-04-03 01:20:54 +02:00
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
2022-04-03 01:20:53 +02:00
},
{
2022-04-03 01:20:54 +02:00
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
2022-04-03 01:20:53 +02:00
},
]
# Internationalization
# https://docs.djangoproject.com/en/3.2/topics/i18n/
2022-04-03 01:20:54 +02:00
LANGUAGE_CODE = "fr-fr"
2022-04-03 01:20:53 +02:00
2022-04-03 01:20:54 +02:00
TIME_ZONE = "UTC"
2022-04-03 01:20:53 +02:00
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.2/howto/static-files/
2022-04-03 01:20:54 +02:00
STATIC_URL = "/static/"
2022-04-03 01:20:53 +02:00
# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
2022-04-03 01:20:54 +02:00
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"