distinct podcast list on category page
[mygpo.git] / mygpo / settings.py
blob761eda9c81e493c606211a7c5ea4c75764bdd240
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 # http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#ChangedthewayURLpathsaredetermined
22 FORCE_SCRIPT_NAME=""
24 DEBUG = True
25 TEMPLATE_DEBUG = DEBUG
27 ADMINS = (
28 ('stefan', 'stefan@skoegl.net'),
29 # ('Your Name', 'your_email@domain.com'),
32 MANAGERS = ADMINS
34 DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
35 DATABASE_NAME = 'mygpo' # Or path to database file if using sqlite3.
36 DATABASE_USER = 'mygpo' # Not used with sqlite3.
37 DATABASE_PASSWORD = '' # Not used with sqlite3.
38 DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
39 DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
41 # Local time zone for this installation. Choices can be found here:
42 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
43 # although not all choices may be available on all operating systems.
44 # If running in a Windows environment this must be set to the same as your
45 # system time zone.
46 TIME_ZONE = 'UTC'
48 # Language code for this installation. All choices can be found here:
49 # http://www.i18nguy.com/unicode/language-identifiers.html
50 LANGUAGE_CODE = 'en-us'
52 SITE_ID = 1
54 # If you set this to False, Django will make some optimizations so as not
55 # to load the internationalization machinery.
56 USE_I18N = True
58 # Absolute path to the directory that holds media.
59 # Example: "/home/media/media.lawrence.com/"
60 MEDIA_ROOT = os.path.abspath('%s/../htdocs/media/' % os.path.dirname(__file__))
62 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
63 # trailing slash if there is a path component (optional in other cases).
64 # Examples: "http://media.lawrence.com", "http://example.com/media/"
65 MEDIA_URL = ''
67 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
68 # trailing slash.
69 # Examples: "http://foo.com/media/", "/media/".
70 ADMIN_MEDIA_PREFIX = '/media/admin/'
72 # Make this unique, and don't share it with anybody.
73 SECRET_KEY = '8s(g1_%+-^@xw*ulzg&gmhj+mp5!m50-p5!721aoai3q67kym!'
75 # List of callables that know how to import templates from various sources.
76 TEMPLATE_LOADERS = (
77 'django.template.loaders.filesystem.load_template_source',
78 'django.template.loaders.app_directories.load_template_source',
79 # 'django.template.loaders.eggs.load_template_source',
82 MIDDLEWARE_CLASSES = (
83 'django.middleware.common.CommonMiddleware',
84 'django.middleware.csrf.CsrfViewMiddleware',
85 'django.contrib.sessions.middleware.SessionMiddleware',
86 'django.contrib.auth.middleware.AuthenticationMiddleware',
87 'django.middleware.locale.LocaleMiddleware',
90 ROOT_URLCONF = 'mygpo.urls'
92 TEMPLATE_DIRS = (
93 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
94 # Always use forward slashes, even on Windows.
95 # Don't forget to use absolute paths, not relative paths.
98 INSTALLED_APPS = (
99 'django.contrib.auth',
100 'django.contrib.contenttypes',
101 'django.contrib.sessions',
102 'django.contrib.sites',
103 'django.contrib.admin',
104 'django.contrib.humanize',
105 'registration',
106 'haystack',
107 'mygpo.api',
108 'mygpo.web',
109 'mygpo.publisher',
110 'mygpo.data',
111 'mygpo.userfeeds',
114 ACCOUNT_ACTIVATION_DAYS = 7
116 AUTHENTICATION_BACKENDS = (
117 'django.contrib.auth.backends.ModelBackend',
118 'mygpo.auth_backends.EmailAuthenticationBackend',
121 TEMPLATE_CONTEXT_PROCESSORS = (
122 "django.contrib.auth.context_processors.auth",
123 "django.core.context_processors.debug",
124 "django.core.context_processors.i18n",
125 "django.core.context_processors.media",
126 "django.contrib.messages.context_processors.messages",
127 "mygpo.web.googleanalytics.processor",
131 DEFAULT_FROM_EMAIL = 'mygpo@my.gpodder.org'
133 AUTH_PROFILE_MODULE = "api.UserProfile"
135 LOGIN_URL = '/login/'
137 #see http://haystacksearch.org/docs/
138 HAYSTACK_SITECONF = 'mygpo.search_sites'
139 HAYSTACK_SEARCH_ENGINE = 'whoosh'
140 HAYSTACK_WHOOSH_PATH = os.path.abspath('%s/../search_index' % os.path.dirname(__file__))
142 CSRF_FAILURE_VIEW='mygpo.security.csrf_failure'