· 5 years ago · Nov 20, 2019, 07:50 AM
1"""
2Django settings for careerbaybackend project.
3
4Generated by 'django-admin startproject' using Django 2.2.7.
5
6For more information on this file, see
7https://docs.djangoproject.com/en/2.2/topics/settings/
8
9For the full list of settings and their values, see
10https://docs.djangoproject.com/en/2.2/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/2.2/howto/deployment/checklist/
21
22# SECURITY WARNING: keep the secret key used in production secret!
23SECRET_KEY = '4wt)82k7fiz9kjdc++*_9+ib91)ox#r*v+&5x7*!n48k=pc8ps'
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 'accounts',
41 'jobs',
42 'rest_framework'
43
44]
45
46MIDDLEWARE = [
47 'django.middleware.security.SecurityMiddleware',
48 'django.contrib.sessions.middleware.SessionMiddleware',
49 'django.middleware.common.CommonMiddleware',
50 'django.middleware.csrf.CsrfViewMiddleware',
51 'django.contrib.auth.middleware.AuthenticationMiddleware',
52 'django.contrib.messages.middleware.MessageMiddleware',
53 'django.middleware.clickjacking.XFrameOptionsMiddleware',
54]
55
56ROOT_URLCONF = 'careerbaybackend.urls'
57
58TEMPLATES = [
59 {
60 'BACKEND': 'django.template.backends.django.DjangoTemplates',
61 'DIRS': [],
62 'APP_DIRS': True,
63 'OPTIONS': {
64 'context_processors': [
65 'django.template.context_processors.debug',
66 'django.template.context_processors.request',
67 'django.contrib.auth.context_processors.auth',
68 'django.contrib.messages.context_processors.messages',
69 ],
70 },
71 },
72]
73
74WSGI_APPLICATION = 'careerbaybackend.wsgi.application'
75
76
77AUTH_USER_MODEL = 'accounts.User'
78
79# Database
80# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
81
82DATABASES = {
83 'default': {
84 'ENGINE': 'django.db.backends.postgresql',
85 'NAME': 'careerbay',
86 'USER': 'snb',
87 'PASSWORD': '1212',
88 'HOST': 'localhost',
89 'PORT': '',
90 }
91}
92
93# Password validation
94# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
95
96AUTH_PASSWORD_VALIDATORS = [
97 {
98 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
99 },
100 {
101 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
102 },
103 {
104 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
105 },
106 {
107 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
108 },
109]
110
111
112# Internationalization
113# https://docs.djangoproject.com/en/2.2/topics/i18n/
114
115LANGUAGE_CODE = 'en-us'
116
117TIME_ZONE = 'UTC'
118
119USE_I18N = True
120
121USE_L10N = True
122
123USE_TZ = True
124
125
126# Static files (CSS, JavaScript, Images)
127# https://docs.djangoproject.com/en/2.2/howto/static-files/
128
129STATIC_URL = '/static/'