· 8 years ago · Jan 28, 2018, 01:34 PM
1"""
2Django settings for shonirvor project.
3
4Generated by 'django-admin startproject' using Django 1.11.6.
5
6For more information on this file, see
7https://docs.djangoproject.com/en/1.11/topics/settings/
8
9For the full list of settings and their values, see
10https://docs.djangoproject.com/en/1.11/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/1.11/howto/deployment/checklist/
21
22# SECURITY WARNING: keep the secret key used in production secret!
23SECRET_KEY = '(77*ipco@n!p&*%%nl)#fpn_it=td@#6p_w%k2yfp**_ftfj$_'
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 'services',
42 'userprofile',
43 'review',
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 = 'shonirvor.urls'
57
58TEMPLATES = [
59 {
60 'BACKEND': 'django.template.backends.django.DjangoTemplates',
61 'DIRS': ["templates"],
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 = 'shonirvor.wsgi.application'
75
76
77# Database
78# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
79
80DATABASES = {
81 'default': {
82 'ENGINE': 'django.db.backends.postgresql_psycopg2',
83 'NAME': 'shonirvor',
84 'USER': 'postgres',
85 'HOST': 'localhost',
86 'PORT': '5432',
87 'PASSWORD': 'pgsql',
88 }
89}
90
91# Password validation
92# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
93
94AUTH_PASSWORD_VALIDATORS = [
95 {
96 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
97 },
98 {
99 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
100 },
101 {
102 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
103 },
104 {
105 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
106 },
107]
108
109
110# Internationalization
111# https://docs.djangoproject.com/en/1.11/topics/i18n/
112
113LANGUAGE_CODE = 'en-us'
114
115TIME_ZONE = 'UTC'
116
117USE_I18N = True
118
119USE_L10N = True
120
121USE_TZ = True
122
123
124# Static files (CSS, JavaScript, Images)
125# https://docs.djangoproject.com/en/1.11/howto/static-files/
126
127STATIC_URL = '/static/'
128STATICFILES_DIRS = [
129 os.path.join(BASE_DIR,"static")
130]
131
132MEDIA_URL = '/media/'
133MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
134
135# twilio api settings
136TWILIO_ACCOUNT_SID='AC02ddff5dc5e2da448b00b04fe5ad6ce5'
137TWILIO_AUTH_TOKEN='a85adb206be66bde54ed32d732ca6ecb'
138TWILIO_FROM_NUMBER='+17344371188'