Skip to content
This repository was archived by the owner on Mar 10, 2018. It is now read-only.

Commit 57e9b0e

Browse files
committed
base for inter
1 parent 5ba40b9 commit 57e9b0e

File tree

1 file changed

+164
-0
lines changed

1 file changed

+164
-0
lines changed

dcid/settings.py

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Django settings for dcid project.
2+
import os
3+
4+
DEBUG = True
5+
TEMPLATE_DEBUG = DEBUG
6+
7+
ADMINS = (
8+
('admin', '[email protected]'),
9+
)
10+
11+
MANAGERS = ADMINS
12+
13+
DATABASES = {
14+
'default': {
15+
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
16+
'NAME': 'dcid_db', # Or path to database file if using sqlite3.
17+
'USER': 'root', # Not used with sqlite3.
18+
'PASSWORD': '', # Not used with sqlite3.
19+
'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3.
20+
'PORT': '', # Set to empty string for default. Not used with sqlite3.
21+
}
22+
}
23+
24+
SITE_ROOT = os.path.abspath(os.path.dirname(__file__))
25+
26+
# Local time zone for this installation. Choices can be found here:
27+
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
28+
# although not all choices may be available on all operating systems.
29+
# In a Windows environment this must be set to your system time zone.
30+
TIME_ZONE = 'Europe/Lisbon'
31+
32+
# Language code for this installation. All choices can be found here:
33+
# http://www.i18nguy.com/unicode/language-identifiers.html
34+
LANGUAGE_CODE = 'en-us'
35+
36+
SITE_ID = 1
37+
38+
# Directories where Django looks for translation files
39+
LOCALE_PATHS = (
40+
os.path.join(SITE_ROOT, 'dcid/locale'),
41+
)
42+
43+
# If you set this to False, Django will make some optimizations so as not
44+
# to load the internationalization machinery.
45+
USE_I18N = True
46+
47+
# If you set this to False, Django will not format dates, numbers and
48+
# calendars according to the current locale.
49+
USE_L10N = True
50+
51+
# If you set this to False, Django will not use timezone-aware datetimes.
52+
USE_TZ = True
53+
54+
# Absolute filesystem path to the directory that will hold user-uploaded files.
55+
# Example: "/home/media/media.lawrence.com/media/"
56+
MEDIA_ROOT = ''
57+
58+
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
59+
# trailing slash.
60+
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
61+
MEDIA_URL = ''
62+
63+
# Absolute path to the directory static files should be collected to.
64+
# Don't put anything in this directory yourself; store your static files
65+
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
66+
# Example: "/home/media/media.lawrence.com/static/"
67+
STATIC_ROOT = os.path.join(SITE_ROOT, 'static/')
68+
SOURCE_PATH = os.path.join(SITE_ROOT, 'source/')
69+
70+
# URL prefix for static files.
71+
# Example: "http://media.lawrence.com/static/"
72+
STATIC_URL = '/static/'
73+
74+
# Additional locations of static files
75+
STATICFILES_DIRS = (
76+
# Put strings here, like "/home/html/static" or "C:/www/django/static".
77+
# Always use forward slashes, even on Windows.
78+
# Don't forget to use absolute paths, not relative paths.
79+
)
80+
81+
# List of finder classes that know how to find static files in
82+
# various locations.
83+
STATICFILES_FINDERS = (
84+
'django.contrib.staticfiles.finders.FileSystemFinder',
85+
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
86+
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
87+
)
88+
89+
# Make this unique, and don't share it with anybody.
90+
SECRET_KEY = '_5s047mnm!*flrgn)es8@kzigeqnarc2s@_q9wxkwve5c60f!5'
91+
92+
# List of callables that know how to import templates from various sources.
93+
TEMPLATE_LOADERS = (
94+
'django.template.loaders.filesystem.Loader',
95+
'django.template.loaders.app_directories.Loader',
96+
# 'django.template.loaders.eggs.Loader',
97+
)
98+
99+
MIDDLEWARE_CLASSES = (
100+
'django.middleware.common.CommonMiddleware',
101+
'django.contrib.sessions.middleware.SessionMiddleware',
102+
'django.middleware.csrf.CsrfViewMiddleware',
103+
'django.contrib.auth.middleware.AuthenticationMiddleware',
104+
'django.contrib.messages.middleware.MessageMiddleware',
105+
# Uncomment the next line for simple clickjacking protection:
106+
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
107+
)
108+
109+
ROOT_URLCONF = 'dcid.urls'
110+
111+
# Python dotted path to the WSGI application used by Django's runserver.
112+
WSGI_APPLICATION = 'dcid.wsgi.application'
113+
114+
TEMPLATE_DIRS = (
115+
os.path.join(SITE_ROOT, '../templates/'),
116+
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
117+
# Always use forward slashes, even on Windows.
118+
# Don't forget to use absolute paths, not relative paths.
119+
)
120+
121+
INSTALLED_APPS = (
122+
'django.contrib.auth',
123+
'django.contrib.contenttypes',
124+
'django.contrib.sessions',
125+
'django.contrib.sites',
126+
'django.contrib.messages',
127+
'django.contrib.staticfiles',
128+
'django.contrib.humanize',
129+
'parliament',
130+
# Uncomment the next line to enable the admin:
131+
'django.contrib.admin',
132+
# Uncomment the next line to enable admin documentation:
133+
# 'django.contrib.admindocs',
134+
#a'south',
135+
)
136+
137+
# A sample logging configuration. The only tangible logging
138+
# performed by this configuration is to send an email to
139+
# the site admins on every HTTP 500 error when DEBUG=False.
140+
# See http://docs.djangoproject.com/en/dev/topics/logging for
141+
# more details on how to customize your logging configuration.
142+
LOGGING = {
143+
'version': 1,
144+
'disable_existing_loggers': False,
145+
'filters': {
146+
'require_debug_false': {
147+
'()': 'django.utils.log.RequireDebugFalse'
148+
}
149+
},
150+
'handlers': {
151+
'mail_admins': {
152+
'level': 'ERROR',
153+
'filters': ['require_debug_false'],
154+
'class': 'django.utils.log.AdminEmailHandler'
155+
}
156+
},
157+
'loggers': {
158+
'django.request': {
159+
'handlers': ['mail_admins'],
160+
'level': 'ERROR',
161+
'propagate': True,
162+
},
163+
}
164+
}

0 commit comments

Comments
 (0)