1 # Django settings for audiobooks project.
2 # -*- coding: utf-8 -*-
5 PROJECT_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
10 TEMPLATE_DEBUG = DEBUG
13 # ('Your Name', 'your_email@example.com'),
20 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
21 'NAME': os.path.join(PROJECT_ROOT, 'dev.sqlite'), # Or path to database file if using sqlite3.
22 'USER': '', # Not used with sqlite3.
23 'PASSWORD': '', # Not used with sqlite3.
24 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
25 'PORT': '', # Set to empty string for default. Not used with sqlite3.
29 # Local time zone for this installation. Choices can be found here:
30 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
31 # although not all choices may be available on all operating systems.
32 # On Unix systems, a value of None will cause Django to use the same
33 # timezone as the operating system.
34 # If running in a Windows environment this must be set to the same as your
36 TIME_ZONE = 'Europe/Warsaw'
38 # Language code for this installation. All choices can be found here:
39 # http://www.i18nguy.com/unicode/language-identifiers.html
44 # If you set this to False, Django will make some optimizations so as not
45 # to load the internationalization machinery.
48 # If you set this to False, Django will not format dates, numbers and
49 # calendars according to the current locale
52 # Absolute filesystem path to the directory that will hold user-uploaded files.
53 # Example: "/home/media/media.lawrence.com/media/"
54 MEDIA_ROOT = os.path.join(PROJECT_ROOT, '../media/')
56 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
58 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
61 # Absolute path to the directory static files should be collected to.
62 # Don't put anything in this directory yourself; store your static files
63 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
64 # Example: "/home/media/media.lawrence.com/static/"
67 # URL prefix for static files.
68 # Example: "http://media.lawrence.com/static/"
69 STATIC_URL = '/static/'
71 # URL prefix for admin static files -- CSS, JavaScript and images.
72 # Make sure to use a trailing slash.
73 # Examples: "http://foo.com/static/admin/", "/static/admin/".
74 ADMIN_MEDIA_PREFIX = '/static/admin/'
76 # Additional locations of static files
78 # Put strings here, like "/home/html/static" or "C:/www/django/static".
79 # Always use forward slashes, even on Windows.
80 # Don't forget to use absolute paths, not relative paths.
83 # List of finder classes that know how to find static files in
85 STATICFILES_FINDERS = (
86 'django.contrib.staticfiles.finders.FileSystemFinder',
87 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
88 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
91 # Make this unique, and don't share it with anybody.
92 SECRET_KEY = '8ehk^-+pr(o)k6lh_gl9+ks6gkd9u#fka7fv%ikpk(c%llqa6%'
94 # List of callables that know how to import templates from various sources.
96 'django.template.loaders.filesystem.Loader',
97 'django.template.loaders.app_directories.Loader',
98 # 'django.template.loaders.eggs.Loader',
101 MIDDLEWARE_CLASSES = (
102 'django.middleware.common.CommonMiddleware',
103 'django.contrib.sessions.middleware.SessionMiddleware',
104 'django.middleware.csrf.CsrfViewMiddleware',
105 'django.contrib.auth.middleware.AuthenticationMiddleware',
106 'django_cas.middleware.CASMiddleware',
107 'django.contrib.messages.middleware.MessageMiddleware',
110 AUTHENTICATION_BACKENDS = (
111 'django.contrib.auth.backends.ModelBackend',
112 'django_cas.backends.CASBackend',
115 ROOT_URLCONF = 'audiobooks.urls'
118 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
119 # Always use forward slashes, even on Windows.
120 # Don't forget to use absolute paths, not relative paths.
124 'django.contrib.auth',
125 'django.contrib.contenttypes',
126 'django.contrib.sessions',
127 'django.contrib.sites',
128 'django.contrib.messages',
129 'django.contrib.staticfiles',
130 # Uncomment the next line to enable the admin:
131 'django.contrib.admin',
132 # Uncomment the next line to enable admin documentation:
133 # 'django.contrib.admindocs',
142 # A sample logging configuration. The only tangible logging
143 # performed by this configuration is to send an email to
144 # the site admins on every HTTP 500 error.
145 # See http://docs.djangoproject.com/en/dev/topics/logging for
146 # more details on how to customize your logging configuration.
149 'disable_existing_loggers': False,
151 'require_debug_false': {
152 '()': 'django.utils.log.RequireDebugFalse'
158 'filters': ['require_debug_false'],
159 'class': 'django.utils.log.AdminEmailHandler'
164 'handlers': ['mail_admins'],
171 #http://logowanie.nowoczesnapolska.org.pl/cas/'
172 CAS_SERVER_URL = "http://logowanie.nowoczesnapolska.org.pl/cas/"
176 EMAIL_SUBJECT_PREFIX = '[Audio] '
177 SERVER_EMAIL = 'no-reply@audio.wolnelektury.pl'
178 EMAIL_HOST = 'localhost'
182 djcelery.setup_loader()
184 CELERY_SEND_TASK_ERROR_EMAILS = True
185 BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
186 BROKER_HOST = "localhost"
188 BROKER_USER = "guest"
189 BROKER_PASSWORD = "guest"
194 from localsettings import *