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 DEBUG = True |
|
20 |
|
21 TEMPLATE_DEBUG = True |
|
22 |
|
23 ALLOWED_HOSTS = [] |
|
24 |
|
25 # Application definition |
|
26 |
|
27 INSTALLED_APPS = ( |
|
28 'django.contrib.admin', |
|
29 'django.contrib.auth', |
|
30 'django.contrib.contenttypes', |
|
31 'django.contrib.sessions', |
|
32 'django.contrib.messages', |
|
33 'django.contrib.staticfiles', |
|
34 'rest_framework', |
|
35 'rest_framework.authtoken', |
|
36 'corsheaders', |
|
37 'requests', |
|
38 'taggit', |
|
39 'ammico', |
|
40 'authentication', |
|
41 'xmltodict', |
|
42 ) |
|
43 |
|
44 MIDDLEWARE_CLASSES = ( |
|
45 'django.contrib.sessions.middleware.SessionMiddleware', |
|
46 'corsheaders.middleware.CorsMiddleware', |
|
47 'django.middleware.common.CommonMiddleware', |
|
48 'django.middleware.csrf.CsrfViewMiddleware', |
|
49 'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
50 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', |
|
51 'django.contrib.messages.middleware.MessageMiddleware', |
|
52 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
53 ) |
|
54 |
|
55 ROOT_URLCONF = 'urls' |
|
56 |
|
57 WSGI_APPLICATION = 'wsgi.application' |
|
58 |
|
59 CORS_ORIGIN_ALLOW_ALL = True |
|
60 |
|
61 REST_FRAMEWORK = { |
|
62 # Use Django's standard `django.contrib.auth` permissions, |
|
63 # or allow read-only access for unauthenticated users. |
|
64 'DEFAULT_PERMISSION_CLASSES': [ |
|
65 'rest_framework.authentication.TokenAuthentication' |
|
66 ] |
|
67 } |
|
68 |
|
69 CACHES = { |
|
70 'default': { |
|
71 'BACKEND': 'django.core.cache.backends.db.DatabaseCache', |
|
72 'LOCATION': 'cacheTable', |
|
73 } |
|
74 } |
|
75 |
|
76 AUTH_USER_MODEL = 'authentication.AmmicoUser' |
|
77 AUTH_PROFILE_MODULE = 'authentication.Profile' |
|
78 |
|
79 # Internationalization |
|
80 # https://docs.djangoproject.com/en/1.7/topics/i18n/ |
|
81 |
|
82 LANGUAGE_CODE = 'en-us' |
|
83 |
|
84 TIME_ZONE = 'UTC' |
|
85 |
|
86 USE_I18N = True |
|
87 |
|
88 USE_L10N = True |
|
89 |
|
90 USE_TZ = True |
|
91 |
|
92 |
|
93 # Static files (CSS, JavaScript, Images) |
|
94 # https://docs.djangoproject.com/en/1.7/howto/static-files/ |
|
95 |
|
96 STATIC_URL = '/static/' |
|
97 |
|
98 from config import * #@UnusedWildImport |
|
99 |
|