| author | rougeronj |
| Fri, 22 May 2015 12:37:37 +0200 | |
| changeset 90 | faf2cdb47813 |
| parent 77 | ee963d1c409b |
| permissions | -rw-r--r-- |
| 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 |
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', |
|
| 13 | 34 |
'rest_framework', |
| 51 | 35 |
'rest_framework.authtoken', |
| 13 | 36 |
'corsheaders', |
37 |
'requests', |
|
38 |
'taggit', |
|
39 |
'ammico', |
|
|
77
ee963d1c409b
Add new serializer for the data send by Orpheo. We receive XML so we parse it to json. Then we parse some html to get the proper data of each attribute.
rougeronj
parents:
51
diff
changeset
|
40 |
'authentication', |
|
ee963d1c409b
Add new serializer for the data send by Orpheo. We receive XML so we parse it to json. Then we parse some html to get the proper data of each attribute.
rougeronj
parents:
51
diff
changeset
|
41 |
'xmltodict', |
| 12 | 42 |
) |
43 |
||
44 |
MIDDLEWARE_CLASSES = ( |
|
45 |
'django.contrib.sessions.middleware.SessionMiddleware', |
|
| 13 | 46 |
'corsheaders.middleware.CorsMiddleware', |
| 12 | 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 |
||
| 13 | 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': [ |
|
| 51 | 65 |
'rest_framework.authentication.TokenAuthentication' |
| 13 | 66 |
] |
67 |
} |
|
| 12 | 68 |
|
| 15 | 69 |
CACHES = { |
70 |
'default': { |
|
71 |
'BACKEND': 'django.core.cache.backends.db.DatabaseCache', |
|
72 |
'LOCATION': 'cacheTable', |
|
73 |
} |
|
74 |
} |
|
75 |
||
| 51 | 76 |
AUTH_USER_MODEL = 'authentication.AmmicoUser' |
77 |
AUTH_PROFILE_MODULE = 'authentication.Profile' |
|
78 |
||
| 12 | 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/' |
|
| 33 | 97 |
|
98 |
from config import * #@UnusedWildImport |
|
99 |