· 5 years ago · May 20, 2020, 01:52 PM
1"""
2Django settings for EventsManagement project.
3
4Generated by 'django-admin startproject' using Django 3.0.4.
5
6For more information on this file, see
7https://docs.djangoproject.com/en/3.0/topics/settings/
8
9For the full list of settings and their values, see
10https://docs.djangoproject.com/en/3.0/ref/settings/
11"""
12
13import os
14
15# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17
18
19# Quick-start development settings - unsuitable for production
20# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
21
22# SECURITY WARNING: keep the secret key used in production secret!
23SECRET_KEY = '46jn$o!h(@atkazpoine1kl(g!xn=4us2+espprvi-jx#$o2la'
24
25# SECURITY WARNING: don't run with debug turned on in production!
26DEBUG = True
27
28ALLOWED_HOSTS = []
29
30
31# Application definition
32
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 'Delagates',
41 'django_filters',
42 'crispy_forms',
43]
44
45MIDDLEWARE = [
46 'django.middleware.security.SecurityMiddleware',
47 'django.contrib.sessions.middleware.SessionMiddleware',
48 'django.middleware.common.CommonMiddleware',
49 'django.middleware.csrf.CsrfViewMiddleware',
50 'django.contrib.auth.middleware.AuthenticationMiddleware',
51 'django.contrib.messages.middleware.MessageMiddleware',
52 'django.middleware.clickjacking.XFrameOptionsMiddleware',
53]
54
55ROOT_URLCONF = 'EventsManagement.urls'
56
57TEMPLATES = [
58 {
59 'BACKEND': 'django.template.backends.django.DjangoTemplates',
60 'DIRS': [],
61 'APP_DIRS': True,
62 'OPTIONS': {
63 'context_processors': [
64 'django.template.context_processors.debug',
65 'django.template.context_processors.request',
66 'django.contrib.auth.context_processors.auth',
67 'django.contrib.messages.context_processors.messages',
68 ],
69 },
70 },
71]
72
73WSGI_APPLICATION = 'EventsManagement.wsgi.application'
74
75
76# Database
77# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
78
79DATABASES = {
80 'default': {
81 'ENGINE': 'django.db.backends.sqlite3',
82 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
83 }
84}
85
86
87# Password validation
88# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
89
90AUTH_PASSWORD_VALIDATORS = [
91 {
92 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
93 },
94 {
95 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
96 },
97 {
98 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
99 },
100 {
101 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
102 },
103]
104
105
106# Internationalization
107# https://docs.djangoproject.com/en/3.0/topics/i18n/
108
109LANGUAGE_CODE = 'en-us'
110
111TIME_ZONE = 'UTC'
112
113USE_I18N = True
114
115USE_L10N = True
116
117USE_TZ = True
118"""
119Django settings for EventsManagement project.
120
121Generated by 'django-admin startproject' using Django 3.0.4.
122
123For more information on this file, see
124https://docs.djangoproject.com/en/3.0/topics/settings/
125
126For the full list of settings and their values, see
127https://docs.djangoproject.com/en/3.0/ref/settings/
128"""
129
130import os
131
132# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
133BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
134
135
136# Quick-start development settings - unsuitable for production
137# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
138
139# SECURITY WARNING: keep the secret key used in production secret!
140SECRET_KEY = '46jn$o!h(@atkazpoine1kl(g!xn=4us2+espprvi-jx#$o2la'
141
142# SECURITY WARNING: don't run with debug turned on in production!
143DEBUG = True
144
145ALLOWED_HOSTS = []
146
147
148# Application definition
149
150INSTALLED_APPS = [
151 'django.contrib.admin',
152 'django.contrib.auth',
153 'django.contrib.contenttypes',
154 'django.contrib.sessions',
155 'django.contrib.messages',
156 'django.contrib.staticfiles',
157 'Delagates',
158 'django_filters',
159 'crispy_forms',
160]
161
162MIDDLEWARE = [
163 'django.middleware.security.SecurityMiddleware',
164 'django.contrib.sessions.middleware.SessionMiddleware',
165 'django.middleware.common.CommonMiddleware',
166 'django.middleware.csrf.CsrfViewMiddleware',
167 'django.contrib.auth.middleware.AuthenticationMiddleware',
168 'django.contrib.messages.middleware.MessageMiddleware',
169 'django.middleware.clickjacking.XFrameOptionsMiddleware',
170]
171
172ROOT_URLCONF = 'EventsManagement.urls'
173
174TEMPLATES = [
175 {
176 'BACKEND': 'django.template.backends.django.DjangoTemplates',
177 'DIRS': [],
178 'APP_DIRS': True,
179 'OPTIONS': {
180 'context_processors': [
181 'django.template.context_processors.debug',
182 'django.template.context_processors.request',
183 'django.contrib.auth.context_processors.auth',
184 'django.contrib.messages.context_processors.messages',
185 ],
186 },
187 },
188]
189
190WSGI_APPLICATION = 'EventsManagement.wsgi.application'
191
192
193# Database
194# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
195
196DATABASES = {
197 'default': {
198 'ENGINE': 'django.db.backends.sqlite3',
199 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
200 }
201}
202
203
204# Password validation
205# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
206
207AUTH_PASSWORD_VALIDATORS = [
208 {
209 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
210 },
211 {
212 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
213 },
214 {
215 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
216 },
217 {
218 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
219 },
220]
221
222
223# Internationalization
224# https://docs.djangoproject.com/en/3.0/topics/i18n/
225
226LANGUAGE_CODE = 'en-us'
227
228TIME_ZONE = 'UTC'
229
230USE_I18N = True
231
232USE_L10N = True
233
234USE_TZ = True
235
236
237# Static files (CSS, JavaScript, Images)
238# https://docs.djangoproject.com/en/3.0/howto/static-files/
239
240STATIC_URL = '/static/'
241
242CRISPY_TEMPLATE_PACK = 'bootstrap4'
243
244MEDIA_URL = '/img/'
245
246STATICFILES_DIRS = [
247 os.path.join(BASE_DIR, 'Delagates/static')
248
249]
250
251
252#import export
253IMPORT_EXPORT_USE_TRANSACTIONS = True
254
255
256# Static files (CSS, JavaScript, Images)
257# https://docs.djangoproject.com/en/3.0/howto/static-files/
258
259STATIC_URL = '/static/'
260
261CRISPY_TEMPLATE_PACK = 'bootstrap4'
262
263MEDIA_URL = '/img/'
264
265STATICFILES_DIRS = [
266 os.path.join(BASE_DIR, 'Delagates/static')
267
268]
269
270
271#import export
272IMPORT_EXPORT_USE_TRANSACTIONS = True