1 # Django settings for mygpo project.
3 # This file is part of my.gpodder.org.
5 # my.gpodder.org is free software: you can redistribute it and/or modify it
6 # under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or (at your
8 # option) any later version.
10 # my.gpodder.org is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
13 # License for more details.
15 # You should have received a copy of the GNU Affero General Public License
16 # along with my.gpodder.org. If not, see <http://www.gnu.org/licenses/>.
21 BASE_DIR
= os
.path
.dirname(os
.path
.abspath(__file__
))
23 # http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#ChangedthewayURLpathsaredetermined
27 TEMPLATE_DEBUG
= DEBUG
36 'ENGINE': 'django.db.backends.sqlite3',
44 ('mygpo.directory', 'http://127.0.0.1:5984/mygpo'),
45 ('mygpo.core', 'http://127.0.0.1:5984/mygpo'),
49 # Local time zone for this installation. Choices can be found here:
50 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
51 # although not all choices may be available on all operating systems.
52 # If running in a Windows environment this must be set to the same as your
56 # Language code for this installation. All choices can be found here:
57 # http://www.i18nguy.com/unicode/language-identifiers.html
58 LANGUAGE_CODE
= 'en-us'
62 # If you set this to False, Django will make some optimizations so as not
63 # to load the internationalization machinery.
66 # Absolute path to the directory that holds media.
67 # Example: "/home/media/media.lawrence.com/"
68 MEDIA_ROOT
= os
.path
.abspath('%s/../htdocs/media/' % os
.path
.dirname(__file__
))
70 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
71 # trailing slash if there is a path component (optional in other cases).
72 # Examples: "http://media.lawrence.com", "http://example.com/media/"
75 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
77 # Examples: "http://foo.com/media/", "/media/".
78 ADMIN_MEDIA_PREFIX
= '/media/admin/'
80 # List of callables that know how to import templates from various sources.
82 'django.template.loaders.app_directories.Loader',
85 MIDDLEWARE_CLASSES
= (
86 'django.middleware.common.CommonMiddleware',
87 'django.middleware.csrf.CsrfViewMiddleware',
88 'django.contrib.sessions.middleware.SessionMiddleware',
89 'django.contrib.auth.middleware.AuthenticationMiddleware',
90 'django.middleware.locale.LocaleMiddleware',
93 ROOT_URLCONF
= 'mygpo.urls'
98 'django.contrib.auth',
99 'django.contrib.contenttypes',
100 'django.contrib.sessions',
101 'django.contrib.sites',
102 'django.contrib.humanize',
104 'couchdbkit.ext.django',
120 TEST_RUNNER
='mygpo.test.MygpoTestSuiteRunner'
122 ACCOUNT_ACTIVATION_DAYS
= 7
124 AUTHENTICATION_BACKENDS
= (
125 'django.contrib.auth.backends.ModelBackend',
126 'mygpo.auth_backends.EmailAuthenticationBackend',
129 TEMPLATE_CONTEXT_PROCESSORS
= (
130 "django.contrib.auth.context_processors.auth",
131 "django.core.context_processors.debug",
132 "django.core.context_processors.i18n",
133 "django.core.context_processors.media",
134 "django.contrib.messages.context_processors.messages",
135 "mygpo.web.googleanalytics.processor",
139 AUTH_PROFILE_MODULE
= "api.UserProfile"
141 LOGIN_URL
= '/login/'
143 CSRF_FAILURE_VIEW
='mygpo.security.csrf_failure'
146 # The following entries should be set in settings_prod.py
147 DEFAULT_FROM_EMAIL
= ''
149 GOOGLE_ANALYTICS_PROPERTY_ID
=''
150 DIRECTORY_EXCLUDED_TAGS
= ()
155 from settings_prod
import *
156 except ImportError, e
:
158 print >> sys
.stderr
, 'create settings_prod.py with your customized settings'