· 6 years ago · Feb 03, 2019, 06:24 AM
1"""
2Django settings for supportsystem project.
3
4Generated by 'django-admin startproject' using Django 2.1.5.
5
6For more information on this file, see
7https://docs.djangoproject.com/en/2.1/topics/settings/
8
9For the full list of settings and their values, see
10https://docs.djangoproject.com/en/2.1/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__)))
17TEMPLATE_DIR = os.path.join(BASE_DIR, "templates")
18
19# Quick-start development settings - unsuitable for production
20# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
21
22# SECURITY WARNING: keep the secret key used in production secret!
23SECRET_KEY = "u@9f78f)kb&h0#7sg)+sx80s2wp&1@f@z+c8@*nb6lwlt#ovbs"
24
25# SECURITY WARNING: don't run with debug turned on in production!
26DEBUG = True
27
28ALLOWED_HOSTS = []
29
30# Application definition
31
32INSTALLED_APPS = [
33 "django.contrib.admin",
34 "django.contrib.auth",
35 "django.contrib.contenttypes",
36 "django.contrib.sessions",
37 "django.contrib.messages",
38 "django.contrib.staticfiles",
39 "bootstrap4",
40 "widget_tweaks",
41 "account",
42 "tasks",
43 "cases",
44 "tickets",
45 "notices",
46]
47
48MIDDLEWARE = [
49 "django.middleware.security.SecurityMiddleware",
50 "django.contrib.sessions.middleware.SessionMiddleware",
51 "django.middleware.common.CommonMiddleware",
52 "django.middleware.csrf.CsrfViewMiddleware",
53 "django.contrib.auth.middleware.AuthenticationMiddleware",
54 "django.contrib.messages.middleware.MessageMiddleware",
55 "django.middleware.clickjacking.XFrameOptionsMiddleware",
56]
57
58ROOT_URLCONF = "supportsystem.urls"
59
60TEMPLATES = [
61 {
62 "BACKEND": "django.template.backends.django.DjangoTemplates",
63 "DIRS": [TEMPLATE_DIR],
64 "APP_DIRS": True,
65 "OPTIONS": {
66 "context_processors": [
67 "django.template.context_processors.debug",
68 "django.template.context_processors.request",
69 "django.contrib.auth.context_processors.auth",
70 "django.contrib.messages.context_processors.messages",
71 ]
72 },
73 }
74]
75
76WSGI_APPLICATION = "supportsystem.wsgi.application"
77
78# Database
79# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
80
81DATABASES = {
82 "default": {
83 "ENGINE": "django.db.backends.sqlite3",
84 "NAME": os.path.join(BASE_DIR, "db.sqlite3"),
85 }
86}
87
88# Password validation
89# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
90
91AUTH_USER_MODEL = "account.User"
92
93AUTH_PASSWORD_VALIDATORS = [
94 {
95 "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator"
96 },
97 {"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"},
98 {"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
99 {"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
100]
101
102# Internationalization
103# https://docs.djangoproject.com/en/2.1/topics/i18n/
104
105LANGUAGE_CODE = "en-us"
106
107TIME_ZONE = "Asia/Dhaka"
108
109USE_I18N = True
110
111USE_L10N = True
112
113USE_TZ = True
114
115# Static files (CSS, JavaScript, Images)
116# https://docs.djangoproject.com/en/2.1/howto/static-files/
117LOGIN_URL = "account:login"
118LOGIN_REDIRECT_URL = "home"
119STATIC_URL = "/static/"
120STATIC_ROOT = '/media/hasinoor/Projects/freelancer/supportsystem/statics'
121STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]
122MEDIA_URL = "/media/"
123MEDIA_ROOT = os.path.join(BASE_DIR, "media")