blob: 16e3b971c94e4ca51ea3206e23be4cdbe5e27db1 [file] [log] [blame]
Tony Mack7130ac32013-03-22 21:58:00 -04001# Django settings for planetstack project.
2
3DEBUG = True
4TEMPLATE_DEBUG = DEBUG
5
6ADMINS = (
7 # ('Your Name', 'your_email@example.com'),
8)
9
10MANAGERS = ADMINS
11
Tony Mack281336b2013-03-29 12:19:25 -040012from plstackapi.planetstack.config import Config
13config = Config()
Tony Mack7130ac32013-03-22 21:58:00 -040014DATABASES = {
15 'default': {
16 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
Tony Mack281336b2013-03-29 12:19:25 -040017 'NAME': config.db_name, # Or path to database file if using sqlite3.
Tony Mack7130ac32013-03-22 21:58:00 -040018 # The following settings are not used with sqlite3:
Tony Mack281336b2013-03-29 12:19:25 -040019 'USER': config.db_user,
20 'PASSWORD': config.db_password,
21 'HOST': config.db_host, # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
Tony Mack7130ac32013-03-22 21:58:00 -040022 'PORT': '', # Set to empty string for default.
23 }
24}
25
26# Hosts/domain names that are valid for this site; required if DEBUG is False
27# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
28ALLOWED_HOSTS = []
29
30# Local time zone for this installation. Choices can be found here:
31# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
32# although not all choices may be available on all operating systems.
33# In a Windows environment this must be set to your system time zone.
34TIME_ZONE = 'America/New_York'
35
36# Language code for this installation. All choices can be found here:
37# http://www.i18nguy.com/unicode/language-identifiers.html
38LANGUAGE_CODE = 'en-us'
39
40SITE_ID = 1
41
42# If you set this to False, Django will make some optimizations so as not
43# to load the internationalization machinery.
44USE_I18N = True
45
46# If you set this to False, Django will not format dates, numbers and
47# calendars according to the current locale.
48USE_L10N = True
49
50# If you set this to False, Django will not use timezone-aware datetimes.
51USE_TZ = True
52
53# Absolute filesystem path to the directory that will hold user-uploaded files.
54# Example: "/var/www/example.com/media/"
55MEDIA_ROOT = ''
56
57# URL that handles the media served from MEDIA_ROOT. Make sure to use a
58# trailing slash.
59# Examples: "http://example.com/media/", "http://media.example.com/"
60MEDIA_URL = ''
61
62# Absolute path to the directory static files should be collected to.
63# Don't put anything in this directory yourself; store your static files
64# in apps' "static/" subdirectories and in STATICFILES_DIRS.
65# Example: "/var/www/example.com/static/"
66STATIC_ROOT = ''
67
68# URL prefix for static files.
69# Example: "http://example.com/static/", "http://static.example.com/"
70STATIC_URL = '/static/'
71
72# Additional locations of static files
73STATICFILES_DIRS = (
74 # Put strings here, like "/home/html/static" or "C:/www/django/static".
75 # Always use forward slashes, even on Windows.
76 # Don't forget to use absolute paths, not relative paths.
77)
78
79# List of finder classes that know how to find static files in
80# various locations.
81STATICFILES_FINDERS = (
82 'django.contrib.staticfiles.finders.FileSystemFinder',
83 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
84# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
85)
86
87# Make this unique, and don't share it with anybody.
88SECRET_KEY = 'i0=a)c7_#2)5m%k_fu#%53xap$tlqc+#&z5as+bl7&)(@be_f9'
89
90# List of callables that know how to import templates from various sources.
91TEMPLATE_LOADERS = (
92 'django.template.loaders.filesystem.Loader',
93 'django.template.loaders.app_directories.Loader',
94# 'django.template.loaders.eggs.Loader',
95)
96
97MIDDLEWARE_CLASSES = (
98 'django.middleware.common.CommonMiddleware',
99 'django.contrib.sessions.middleware.SessionMiddleware',
100 'django.middleware.csrf.CsrfViewMiddleware',
101 'django.contrib.auth.middleware.AuthenticationMiddleware',
102 'django.contrib.messages.middleware.MessageMiddleware',
103 # Uncomment the next line for simple clickjacking protection:
104 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
105)
106
Tony Mackb1a54fb2013-03-29 12:06:46 -0400107ROOT_URLCONF = 'plstackapi.planetstack.urls'
Tony Mack7130ac32013-03-22 21:58:00 -0400108
109# Python dotted path to the WSGI application used by Django's runserver.
Tony Mackb1a54fb2013-03-29 12:06:46 -0400110WSGI_APPLICATION = 'plstackapi.planetstack.wsgi.application'
Tony Mack7130ac32013-03-22 21:58:00 -0400111
112TEMPLATE_DIRS = (
113 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
114 # Always use forward slashes, even on Windows.
115 # Don't forget to use absolute paths, not relative paths.
116)
117
118INSTALLED_APPS = (
119 'django.contrib.auth',
120 'django.contrib.contenttypes',
121 'django.contrib.sessions',
122# 'django.contrib.sites',
123 'django.contrib.messages',
124 'django.contrib.staticfiles',
125 # Uncomment the next line to enable the admin:
126 'django.contrib.admin',
127 # Uncomment the next line to enable admin documentation:
128 'django.contrib.admindocs',
129 'rest_framework',
130 'django_extensions',
Tony Mack7130ac32013-03-22 21:58:00 -0400131 'django_evolution',
Tony Mack140c47c2013-04-09 19:13:08 -0400132 #'plstackapi.planetstack',
Tony Mack176c5f12013-04-09 18:55:07 -0400133 'plstackapi.core',
Tony Mack7130ac32013-03-22 21:58:00 -0400134)
135
136# A sample logging configuration. The only tangible logging
137# performed by this configuration is to send an email to
138# the site admins on every HTTP 500 error when DEBUG=False.
139# See http://docs.djangoproject.com/en/dev/topics/logging for
140# more details on how to customize your logging configuration.
141LOGGING = {
142 'version': 1,
143 'disable_existing_loggers': False,
144 'filters': {
145 'require_debug_false': {
146 '()': 'django.utils.log.RequireDebugFalse'
147 }
148 },
149 'handlers': {
150 'mail_admins': {
151 'level': 'ERROR',
152 'filters': ['require_debug_false'],
153 'class': 'django.utils.log.AdminEmailHandler'
154 }
155 },
156 'loggers': {
157 'django.request': {
158 'handlers': ['mail_admins'],
159 'level': 'ERROR',
160 'propagate': True,
161 },
162 }
163}