profiles_project.settings   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 130
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 54
dl 0
loc 130
rs 10
c 0
b 0
f 0
1
"""
2
Django settings for profiles_project project.
3
4
Generated by 'django-admin startproject' using Django 1.11.
5
6
For more information on this file, see
7
https://docs.djangoproject.com/en/1.11/topics/settings/
8
9
For the full list of settings and their values, see
10
https://docs.djangoproject.com/en/1.11/ref/settings/
11
"""
12
13
import os
14
15
16
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
17
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
18
19
20
# Quick-start development settings - unsuitable for production
21
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
22
23
# SECURITY WARNING: keep the secret key used in production secret!
24
SECRET_KEY = '2ps$+d=nje-t5q+oy-nfdq*cfzv7*b!$9x3zen*g@h0(e8ga3c'
25
26
# SECURITY WARNING: don't run with debug turned on in production!
27
DEBUG = True
28
29
ALLOWED_HOSTS = []
30
31
32
# Application definition
33
34
INSTALLED_APPS = [
35
    'django.contrib.admin',
36
    'django.contrib.auth',
37
    'django.contrib.contenttypes',
38
    'django.contrib.sessions',
39
    'django.contrib.messages',
40
    'django.contrib.staticfiles',
41
    'rest_framework',
42
    'rest_framework.authtoken',
43
    'profiles_api',
44
]
45
46
MIDDLEWARE = [
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
56
ROOT_URLCONF = 'profiles_project.urls'
57
58
TEMPLATES = [
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
74
WSGI_APPLICATION = 'profiles_project.wsgi.application'
75
76
77
# Database
78
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
79
80
DATABASES = {
81
    'default': {
82
        'ENGINE': 'django.db.backends.sqlite3',
83
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
84
    }
85
}
86
87
88
# Password validation
89
# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
90
91
AUTH_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/1.11/topics/i18n/
109
110
LANGUAGE_CODE = 'en-us'
111
112
TIME_ZONE = 'UTC'
113
114
USE_I18N = True
115
116
USE_L10N = True
117
118
USE_TZ = True
119
120
121
# Static files (CSS, JavaScript, Images)
122
# https://docs.djangoproject.com/en/1.11/howto/static-files/
123
124
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
125
STATIC_URL = '/static/'
126
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')
127
128
129
AUTH_USER_MODEL = 'profiles_api.UserProfile'
130