| author | rougeronj |
| Mon, 23 Mar 2015 12:21:17 +0100 | |
| changeset 22 | 609fa711b324 |
| parent 15 | a3b7c0823378 |
| child 33 | c71a015191f6 |
| 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 |
# 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 |
||
|
22
609fa711b324
add URL_JAMESPOT in settings - add requirements.txt to build the virtual env
rougeronj
parents:
15
diff
changeset
|
29 |
URL_JAMESPOT = 'http://fui-ammico.jamespot.pro/api/api.php?&k=6c8bfcea247e8a5841288269887d88f0&d=2016-01-31&m=EXT-IRI&v=2.0' |
|
609fa711b324
add URL_JAMESPOT in settings - add requirements.txt to build the virtual env
rougeronj
parents:
15
diff
changeset
|
30 |
|
| 12 | 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', |
|
| 13 | 41 |
'rest_framework', |
42 |
'corsheaders', |
|
43 |
'requests', |
|
44 |
'taggit', |
|
45 |
'ammico', |
|
| 12 | 46 |
) |
47 |
||
48 |
MIDDLEWARE_CLASSES = ( |
|
49 |
'django.contrib.sessions.middleware.SessionMiddleware', |
|
| 13 | 50 |
'corsheaders.middleware.CorsMiddleware', |
| 12 | 51 |
'django.middleware.common.CommonMiddleware', |
52 |
'django.middleware.csrf.CsrfViewMiddleware', |
|
53 |
'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
54 |
'django.contrib.auth.middleware.SessionAuthenticationMiddleware', |
|
55 |
'django.contrib.messages.middleware.MessageMiddleware', |
|
56 |
'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
57 |
) |
|
58 |
||
59 |
ROOT_URLCONF = 'urls' |
|
60 |
||
61 |
WSGI_APPLICATION = 'wsgi.application' |
|
62 |
||
| 13 | 63 |
CORS_ORIGIN_ALLOW_ALL = True |
64 |
||
65 |
REST_FRAMEWORK = { |
|
66 |
# Use Django's standard `django.contrib.auth` permissions, |
|
67 |
# or allow read-only access for unauthenticated users. |
|
68 |
'DEFAULT_PERMISSION_CLASSES': [ |
|
69 |
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' |
|
70 |
] |
|
71 |
} |
|
| 12 | 72 |
|
73 |
# Database |
|
74 |
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases |
|
75 |
||
76 |
DATABASES = { |
|
77 |
'default': { |
|
|
22
609fa711b324
add URL_JAMESPOT in settings - add requirements.txt to build the virtual env
rougeronj
parents:
15
diff
changeset
|
78 |
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
|
609fa711b324
add URL_JAMESPOT in settings - add requirements.txt to build the virtual env
rougeronj
parents:
15
diff
changeset
|
79 |
'NAME': 'ammico_db', # Or path to database file if using sqlite3. |
|
609fa711b324
add URL_JAMESPOT in settings - add requirements.txt to build the virtual env
rougeronj
parents:
15
diff
changeset
|
80 |
'USER': 'postgres', # Not used with sqlite3. |
|
609fa711b324
add URL_JAMESPOT in settings - add requirements.txt to build the virtual env
rougeronj
parents:
15
diff
changeset
|
81 |
'PASSWORD': 'postgres', # Not used with sqlite3. |
|
609fa711b324
add URL_JAMESPOT in settings - add requirements.txt to build the virtual env
rougeronj
parents:
15
diff
changeset
|
82 |
'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3. |
|
609fa711b324
add URL_JAMESPOT in settings - add requirements.txt to build the virtual env
rougeronj
parents:
15
diff
changeset
|
83 |
'PORT': '5432', # Set to empty string for default. Not used with sqlite3. |
| 12 | 84 |
} |
85 |
} |
|
86 |
||
| 15 | 87 |
CACHES = { |
88 |
'default': { |
|
89 |
'BACKEND': 'django.core.cache.backends.db.DatabaseCache', |
|
90 |
'LOCATION': 'cacheTable', |
|
91 |
} |
|
92 |
} |
|
93 |
||
| 12 | 94 |
# Internationalization |
95 |
# https://docs.djangoproject.com/en/1.7/topics/i18n/ |
|
96 |
||
97 |
LANGUAGE_CODE = 'en-us' |
|
98 |
||
99 |
TIME_ZONE = 'UTC' |
|
100 |
||
101 |
USE_I18N = True |
|
102 |
||
103 |
USE_L10N = True |
|
104 |
||
105 |
USE_TZ = True |
|
106 |
||
107 |
||
108 |
# Static files (CSS, JavaScript, Images) |
|
109 |
# https://docs.djangoproject.com/en/1.7/howto/static-files/ |
|
110 |
||
111 |
STATIC_URL = '/static/' |