|
12
|
1 |
""" |
|
|
2 |
Django settings for ammico project. |
|
|
3 |
|
|
|
4 |
For more information on this file, see |
|
|
5 |
https://docs.djangoproject.com/en/1.7/topics/settings/ |
|
|
6 |
|
|
|
7 |
For the full list of settings and their values, see |
|
|
8 |
https://docs.djangoproject.com/en/1.7/ref/settings/ |
|
|
9 |
""" |
|
|
10 |
|
|
|
11 |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) |
|
|
12 |
import os |
|
|
13 |
BASE_DIR = os.path.dirname(os.path.dirname(__file__)) |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
# Quick-start development settings - unsuitable for production |
|
|
17 |
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ |
|
|
18 |
|
|
|
19 |
# SECURITY WARNING: keep the secret key used in production secret! |
|
|
20 |
SECRET_KEY = '0v@^(8qtky0yze1)_xrr15p9_lmd0xc@u^t--4_s7d6qlegd-l' |
|
|
21 |
|
|
|
22 |
# SECURITY WARNING: don't run with debug turned on in production! |
|
|
23 |
DEBUG = True |
|
|
24 |
|
|
|
25 |
TEMPLATE_DEBUG = True |
|
|
26 |
|
|
|
27 |
ALLOWED_HOSTS = [] |
|
|
28 |
|
|
|
29 |
|
|
|
30 |
# Application definition |
|
|
31 |
|
|
|
32 |
INSTALLED_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', |
|
13
|
39 |
'rest_framework', |
|
|
40 |
'corsheaders', |
|
|
41 |
'requests', |
|
|
42 |
'taggit', |
|
|
43 |
'ammico', |
|
12
|
44 |
) |
|
|
45 |
|
|
|
46 |
MIDDLEWARE_CLASSES = ( |
|
|
47 |
'django.contrib.sessions.middleware.SessionMiddleware', |
|
13
|
48 |
'corsheaders.middleware.CorsMiddleware', |
|
12
|
49 |
'django.middleware.common.CommonMiddleware', |
|
|
50 |
'django.middleware.csrf.CsrfViewMiddleware', |
|
|
51 |
'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
|
52 |
'django.contrib.auth.middleware.SessionAuthenticationMiddleware', |
|
|
53 |
'django.contrib.messages.middleware.MessageMiddleware', |
|
|
54 |
'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
|
55 |
) |
|
|
56 |
|
|
|
57 |
ROOT_URLCONF = 'urls' |
|
|
58 |
|
|
|
59 |
WSGI_APPLICATION = 'wsgi.application' |
|
|
60 |
|
|
13
|
61 |
CORS_ORIGIN_ALLOW_ALL = True |
|
|
62 |
|
|
|
63 |
REST_FRAMEWORK = { |
|
|
64 |
# Use Django's standard `django.contrib.auth` permissions, |
|
|
65 |
# or allow read-only access for unauthenticated users. |
|
|
66 |
'DEFAULT_PERMISSION_CLASSES': [ |
|
|
67 |
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' |
|
|
68 |
] |
|
|
69 |
} |
|
12
|
70 |
|
|
|
71 |
# Database |
|
|
72 |
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases |
|
|
73 |
|
|
|
74 |
DATABASES = { |
|
|
75 |
'default': { |
|
|
76 |
'ENGINE': 'django.db.backends.sqlite3', |
|
|
77 |
|
|
|
78 |
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), |
|
|
79 |
} |
|
|
80 |
} |
|
|
81 |
|
|
15
|
82 |
CACHES = { |
|
|
83 |
'default': { |
|
|
84 |
'BACKEND': 'django.core.cache.backends.db.DatabaseCache', |
|
|
85 |
'LOCATION': 'cacheTable', |
|
|
86 |
} |
|
|
87 |
} |
|
|
88 |
|
|
12
|
89 |
# Internationalization |
|
|
90 |
# https://docs.djangoproject.com/en/1.7/topics/i18n/ |
|
|
91 |
|
|
|
92 |
LANGUAGE_CODE = 'en-us' |
|
|
93 |
|
|
|
94 |
TIME_ZONE = 'UTC' |
|
|
95 |
|
|
|
96 |
USE_I18N = True |
|
|
97 |
|
|
|
98 |
USE_L10N = True |
|
|
99 |
|
|
|
100 |
USE_TZ = True |
|
|
101 |
|
|
|
102 |
|
|
|
103 |
# Static files (CSS, JavaScript, Images) |
|
|
104 |
# https://docs.djangoproject.com/en/1.7/howto/static-files/ |
|
|
105 |
|
|
|
106 |
STATIC_URL = '/static/' |