· 4 years ago · Jun 07, 2021, 06:12 PM
1"""
2Django settings for ActivStable project.
3Generated by 'django-admin startproject' using Django 3.2.
4For more information on this file, see
5https://docs.djangoproject.com/en/3.2/topics/settings/
6For the full list of settings and their values, see
7https://docs.djangoproject.com/en/3.2/ref/settings/
8"""
9
10from pathlib import Path
11
12# Build paths inside the project like this: BASE_DIR / 'subdir'.
13BASE_DIR = Path(__file__).resolve().parent.parent
14
15
16# Quick-start development settings - unsuitable for production
17# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
18
19# SECURITY WARNING: keep the secret key used in production secret!
20SECRET_KEY = 'django-insecure-9i(86220n9#u(6uphebci-_*3ra30ee8@@#4^csj2c#rqdqso0'
21
22# SECURITY WARNING: don't run with debug turned on in production!
23DEBUG = True
24
25ALLOWED_HOSTS = []
26
27
28# Application definition
29
30INSTALLED_APPS = [
31 'django.contrib.admin',
32 'django.contrib.auth',
33 'django.contrib.contenttypes',
34 'django.contrib.sessions',
35 'django.contrib.messages',
36 'django.contrib.staticfiles',
37 'api.apps.ApiConfig',
38 'frontend.apps.FrontendConfig',
39 'rest_framework',
40]
41
42MIDDLEWARE = [
43 'django.middleware.security.SecurityMiddleware',
44 'django.contrib.sessions.middleware.SessionMiddleware',
45 'django.middleware.common.CommonMiddleware',
46 'django.middleware.csrf.CsrfViewMiddleware',
47 'django.contrib.auth.middleware.AuthenticationMiddleware',
48 'django.contrib.messages.middleware.MessageMiddleware',
49 'django.middleware.clickjacking.XFrameOptionsMiddleware',
50]
51
52ROOT_URLCONF = 'ActivStable.urls'
53
54TEMPLATES = [
55 {
56 'BACKEND': 'django.template.backends.django.DjangoTemplates',
57 'DIRS': [],
58 'APP_DIRS': True,
59 'OPTIONS': {
60 'context_processors': [
61 'django.template.context_processors.debug',
62 'django.template.context_processors.request',
63 'django.contrib.auth.context_processors.auth',
64 'django.contrib.messages.context_processors.messages',
65 ],
66 },
67 },
68]
69
70WSGI_APPLICATION = 'ActivStable.wsgi.application'
71
72
73# Database
74# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
75
76DATABASES = {
77 'default': {
78 'ENGINE': 'django.db.backends.postgresql',
79 'NAME': 'd7kch1sj2c675v',
80 'USER': 'znphsaxscqwmpw',
81 'PASSWORD': '20c24621762e7c43854fa89216acd7b8a558e078a3342e945bf1d238e5e4ce1e',
82 'HOST': 'ec2-34-254-120-2.eu-west-1.compute.amazonaws.com',
83 'PORT': '5432'
84 }
85}
86
87
88# Password validation
89# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
90
91AUTH_PASSWORD_VALIDATORS = [
92 {
93 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
94 },
95 {
96 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
97 },
98 {
99 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
100 },
101 {
102 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
103 },
104]
105
106
107# Internationalization
108# https://docs.djangoproject.com/en/3.2/topics/i18n/
109
110LANGUAGE_CODE = 'en-us'
111
112TIME_ZONE = 'UTC'
113
114USE_I18N = True
115
116USE_L10N = True
117
118USE_TZ = True
119
120
121# Static files (CSS, JavaScript, Images)
122# https://docs.djangoproject.com/en/3.2/howto/static-files/
123
124STATIC_URL = '/static/'
125
126# Default primary key field type
127# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
128
129DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'