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 # http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#ChangedthewayURLpathsaredetermined
25 TEMPLATE_DEBUG
= DEBUG
28 ('stefan', 'stefan@skoegl.net'),
29 # ('Your Name', 'your_email@domain.com'),
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
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'
54 # If you set this to False, Django will make some optimizations so as not
55 # to load the internationalization machinery.
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/"
67 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
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.
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'
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.
99 'django.contrib.auth',
100 'django.contrib.contenttypes',
101 'django.contrib.sessions',
102 'django.contrib.sites',
103 'django.contrib.admin',
104 'django.contrib.humanize',
113 ACCOUNT_ACTIVATION_DAYS
= 7
115 AUTHENTICATION_BACKENDS
= (
116 'django.contrib.auth.backends.ModelBackend',
117 'mygpo.auth_backends.EmailAuthenticationBackend',
120 DEFAULT_FROM_EMAIL
= 'mygpo@my.gpodder.org'
122 AUTH_PROFILE_MODULE
= "api.UserProfile"
124 LOGIN_URL
= '/login/'
126 #see http://haystacksearch.org/docs/
127 HAYSTACK_SITECONF
= 'mygpo.search_sites'
128 HAYSTACK_SEARCH_ENGINE
= 'whoosh'
129 HAYSTACK_WHOOSH_PATH
= os
.path
.abspath('%s/../search_index' % os
.path
.dirname(__file__
))
131 CSRF_FAILURE_VIEW
='mygpo.security.csrf_failure'