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',
43 # Local time zone for this installation. Choices can be found here:
44 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
45 # although not all choices may be available on all operating systems.
46 # If running in a Windows environment this must be set to the same as your
50 # Language code for this installation. All choices can be found here:
51 # http://www.i18nguy.com/unicode/language-identifiers.html
52 LANGUAGE_CODE
= 'en-us'
56 # If you set this to False, Django will make some optimizations so as not
57 # to load the internationalization machinery.
60 # Absolute path to the directory that holds media.
61 # Example: "/home/media/media.lawrence.com/"
62 MEDIA_ROOT
= os
.path
.abspath('%s/../htdocs/media/' % os
.path
.dirname(__file__
))
64 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
65 # trailing slash if there is a path component (optional in other cases).
66 # Examples: "http://media.lawrence.com", "http://example.com/media/"
69 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
71 # Examples: "http://foo.com/media/", "/media/".
72 ADMIN_MEDIA_PREFIX
= '/media/admin/'
74 # List of callables that know how to import templates from various sources.
76 'django.template.loaders.app_directories.Loader',
79 MIDDLEWARE_CLASSES
= (
80 'django.middleware.common.CommonMiddleware',
81 'django.middleware.csrf.CsrfViewMiddleware',
82 'django.contrib.sessions.middleware.SessionMiddleware',
83 'django.contrib.auth.middleware.AuthenticationMiddleware',
84 'django.middleware.locale.LocaleMiddleware',
87 ROOT_URLCONF
= 'mygpo.urls'
92 'django.contrib.auth',
93 'django.contrib.contenttypes',
94 'django.contrib.sessions',
95 'django.contrib.sites',
96 'django.contrib.admin',
97 'django.contrib.humanize',
107 ACCOUNT_ACTIVATION_DAYS
= 7
109 AUTHENTICATION_BACKENDS
= (
110 'django.contrib.auth.backends.ModelBackend',
111 'mygpo.auth_backends.EmailAuthenticationBackend',
114 TEMPLATE_CONTEXT_PROCESSORS
= (
115 "django.contrib.auth.context_processors.auth",
116 "django.core.context_processors.debug",
117 "django.core.context_processors.i18n",
118 "django.core.context_processors.media",
119 "django.contrib.messages.context_processors.messages",
120 "mygpo.web.googleanalytics.processor",
124 AUTH_PROFILE_MODULE
= "api.UserProfile"
126 LOGIN_URL
= '/login/'
128 CSRF_FAILURE_VIEW
='mygpo.security.csrf_failure'
131 # The following entries should be set in settings_prod.py
132 DEFAULT_FROM_EMAIL
= ''
134 GOOGLE_ANALYTICS_PROPERTY_ID
=''
135 DIRECTORY_EXCLUDED_TAGS
= ()
140 from settings_prod
import *
141 except ImportError, e
:
143 print >> sys
.stderr
, 'create settings_prod.py with your customized settings'