we can't use django.contrib.admin with CouchDB
[mygpo.git] / mygpo / settings.py
blobe95dae7b68dcc0de4c9931225c0ef4260bdf8c31
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'),
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
53 # system time zone.
54 TIME_ZONE = 'UTC'
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'
60 SITE_ID = 1
62 # If you set this to False, Django will make some optimizations so as not
63 # to load the internationalization machinery.
64 USE_I18N = True
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/"
73 MEDIA_URL = ''
75 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
76 # trailing slash.
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.
81 TEMPLATE_LOADERS = (
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'
95 TEMPLATE_DIRS = ()
97 INSTALLED_APPS = (
98 'django.contrib.auth',
99 'django.contrib.contenttypes',
100 'django.contrib.sessions',
101 'django.contrib.sites',
102 'django.contrib.humanize',
103 'registration',
104 'couchdbkit.ext.django',
105 'mygpo.core',
106 'mygpo.api',
107 'mygpo.web',
108 'mygpo.publisher',
109 'mygpo.data',
110 'mygpo.userfeeds',
111 'mygpo.search',
112 'mygpo.directory',
115 TEST_EXCLUDE = (
116 'django',
117 'registration',
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 = ''
148 SECRET_KEY = ''
149 GOOGLE_ANALYTICS_PROPERTY_ID=''
150 DIRECTORY_EXCLUDED_TAGS = ()
151 FLICKR_API_KEY = ''
154 try:
155 from settings_prod import *
156 except ImportError, e:
157 import sys
158 print >> sys.stderr, 'create settings_prod.py with your customized settings'