replace DirectoryEntry by extended Category data
[mygpo.git] / mygpo / settings.py
blob8c6ec870cc0655e60258c336c4e938840f0f4382
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/>.
19 import os.path
21 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
23 # http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#ChangedthewayURLpathsaredetermined
24 FORCE_SCRIPT_NAME=""
26 DEBUG = True
27 TEMPLATE_DEBUG = DEBUG
29 ADMINS = ()
31 MANAGERS = ADMINS
33 DATABASES = {
34 'default': {
35 'NAME': 'mygpo',
36 'ENGINE': 'django.db.backends.sqlite3',
37 'USER': '',
38 'PASSWORD': '',
39 'HOST': '',
43 COUCHDB_DATABASES = (
44 ('mygpo.directory', 'http://127.0.0.1:5984/mygpo'),
45 ('mygpo.core', 'http://127.0.0.1:5984/mygpo'),
46 ('mygpo.users', 'http://127.0.0.1:5984/mygpo'),
50 # Local time zone for this installation. Choices can be found here:
51 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
52 # although not all choices may be available on all operating systems.
53 # If running in a Windows environment this must be set to the same as your
54 # system time zone.
55 TIME_ZONE = 'UTC'
57 # Language code for this installation. All choices can be found here:
58 # http://www.i18nguy.com/unicode/language-identifiers.html
59 LANGUAGE_CODE = 'en-us'
61 SITE_ID = 1
63 # If you set this to False, Django will make some optimizations so as not
64 # to load the internationalization machinery.
65 USE_I18N = True
67 # Absolute path to the directory that holds media.
68 # Example: "/home/media/media.lawrence.com/"
69 MEDIA_ROOT = os.path.abspath('%s/../htdocs/media/' % os.path.dirname(__file__))
71 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
72 # trailing slash if there is a path component (optional in other cases).
73 # Examples: "http://media.lawrence.com", "http://example.com/media/"
74 MEDIA_URL = ''
76 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
77 # trailing slash.
78 # Examples: "http://foo.com/media/", "/media/".
79 ADMIN_MEDIA_PREFIX = '/media/admin/'
81 # List of callables that know how to import templates from various sources.
82 TEMPLATE_LOADERS = (
83 'django.template.loaders.app_directories.Loader',
86 MIDDLEWARE_CLASSES = (
87 'django.middleware.common.CommonMiddleware',
88 'django.middleware.csrf.CsrfViewMiddleware',
89 'django.contrib.sessions.middleware.SessionMiddleware',
90 'django.contrib.auth.middleware.AuthenticationMiddleware',
91 'django.middleware.locale.LocaleMiddleware',
94 ROOT_URLCONF = 'mygpo.urls'
96 TEMPLATE_DIRS = ()
98 INSTALLED_APPS = (
99 'django.contrib.auth',
100 'django.contrib.sessions',
101 'django.contrib.sites',
102 'django.contrib.humanize',
103 'registration',
104 'couchdbkit.ext.django',
105 'mygpo.core',
106 'mygpo.users',
107 'mygpo.api',
108 'mygpo.web',
109 'mygpo.publisher',
110 'mygpo.data',
111 'mygpo.userfeeds',
112 'mygpo.search',
113 'mygpo.directory',
114 'mygpo.maintenance',
117 TEST_EXCLUDE = (
118 'django',
119 'registration',
122 TEST_RUNNER='mygpo.test.MygpoTestSuiteRunner'
124 ACCOUNT_ACTIVATION_DAYS = 7
126 AUTHENTICATION_BACKENDS = (
127 'django.contrib.auth.backends.ModelBackend',
128 'mygpo.web.auth.EmailAuthenticationBackend',
131 TEMPLATE_CONTEXT_PROCESSORS = (
132 "django.contrib.auth.context_processors.auth",
133 "django.core.context_processors.debug",
134 "django.core.context_processors.i18n",
135 "django.core.context_processors.media",
136 "django.contrib.messages.context_processors.messages",
137 "mygpo.web.googleanalytics.processor",
141 AUTH_PROFILE_MODULE = "api.UserProfile"
143 LOGIN_URL = '/login/'
145 CSRF_FAILURE_VIEW='mygpo.web.views.security.csrf_failure'
148 # The following entries should be set in settings_prod.py
149 DEFAULT_FROM_EMAIL = ''
150 SECRET_KEY = ''
151 GOOGLE_ANALYTICS_PROPERTY_ID=''
152 DIRECTORY_EXCLUDED_TAGS = ()
153 FLICKR_API_KEY = ''
155 MAINTENANCE = os.path.exists('MAINTENANCE')
157 try:
158 from settings_prod import *
159 except ImportError, e:
160 import sys
161 print >> sys.stderr, 'create settings_prod.py with your customized settings'