1 # Django settings for audiobooks project.
2 # -*- coding: utf-8 -*-
5 PROJECT_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
12 # ('Your Name', 'your_email@example.com'),
19 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
20 'NAME': os.path.join(PROJECT_ROOT, 'dev.sqlite'), # Or path to database file if using sqlite3.
21 'USER': '', # Not used with sqlite3.
22 'PASSWORD': '', # Not used with sqlite3.
23 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
24 'PORT': '', # Set to empty string for default. Not used with sqlite3.
28 # Local time zone for this installation. Choices can be found here:
29 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
30 # although not all choices may be available on all operating systems.
31 # On Unix systems, a value of None will cause Django to use the same
32 # timezone as the operating system.
33 # If running in a Windows environment this must be set to the same as your
35 TIME_ZONE = 'Europe/Warsaw'
37 # Language code for this installation. All choices can be found here:
38 # http://www.i18nguy.com/unicode/language-identifiers.html
43 # If you set this to False, Django will make some optimizations so as not
44 # to load the internationalization machinery.
47 # If you set this to False, Django will not format dates, numbers and
48 # calendars according to the current locale
51 # Absolute filesystem path to the directory that will hold user-uploaded files.
52 # Example: "/home/media/media.lawrence.com/media/"
53 MEDIA_ROOT = os.path.join(PROJECT_ROOT, '../media/')
55 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
57 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
60 # Absolute path to the directory static files should be collected to.
61 # Don't put anything in this directory yourself; store your static files
62 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
63 # Example: "/home/media/media.lawrence.com/static/"
66 # URL prefix for static files.
67 # Example: "http://media.lawrence.com/static/"
68 STATIC_URL = '/static/'
70 # URL prefix for admin static files -- CSS, JavaScript and images.
71 # Make sure to use a trailing slash.
72 # Examples: "http://foo.com/static/admin/", "/static/admin/".
73 ADMIN_MEDIA_PREFIX = '/static/admin/'
75 # Additional locations of static files
77 # Put strings here, like "/home/html/static" or "C:/www/django/static".
78 # Always use forward slashes, even on Windows.
79 # Don't forget to use absolute paths, not relative paths.
82 # List of finder classes that know how to find static files in
84 STATICFILES_FINDERS = (
85 'django.contrib.staticfiles.finders.FileSystemFinder',
86 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
87 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
90 # Make this unique, and don't share it with anybody.
91 SECRET_KEY = '8ehk^-+pr(o)k6lh_gl9+ks6gkd9u#fka7fv%ikpk(c%llqa6%'
95 'BACKEND': 'django.template.backends.django.DjangoTemplates',
98 'context_processors': [
99 'django.template.context_processors.debug',
100 'django.template.context_processors.request',
101 'django.contrib.auth.context_processors.auth',
102 'django.contrib.messages.context_processors.messages',
108 MIDDLEWARE_CLASSES = (
109 'django.middleware.common.CommonMiddleware',
110 'django.contrib.sessions.middleware.SessionMiddleware',
111 'django.middleware.csrf.CsrfViewMiddleware',
112 'django.contrib.auth.middleware.AuthenticationMiddleware',
113 'django_cas.middleware.CASMiddleware',
114 'django.contrib.messages.middleware.MessageMiddleware',
117 AUTHENTICATION_BACKENDS = (
118 'django.contrib.auth.backends.ModelBackend',
119 'django_cas.backends.CASBackend',
122 ROOT_URLCONF = 'audiobooks.urls'
125 'django.contrib.auth',
126 'django.contrib.contenttypes',
127 'django.contrib.sessions',
128 'django.contrib.sites',
129 'django.contrib.messages',
130 'django.contrib.staticfiles',
131 'django.contrib.admin',
132 # Uncomment the next line to enable admin documentation:
133 # 'django.contrib.admindocs',
138 # A sample logging configuration. The only tangible logging
139 # performed by this configuration is to send an email to
140 # the site admins on every HTTP 500 error.
141 # See http://docs.djangoproject.com/en/dev/topics/logging for
142 # more details on how to customize your logging configuration.
145 'disable_existing_loggers': False,
147 'require_debug_false': {
148 '()': 'django.utils.log.RequireDebugFalse'
154 'filters': ['require_debug_false'],
155 'class': 'django.utils.log.AdminEmailHandler'
160 'handlers': ['mail_admins'],
167 CAS_SERVER_URL = "https://logowanie.nowoczesnapolska.org.pl/cas/"
170 EMAIL_SUBJECT_PREFIX = '[Audio] '
171 SERVER_EMAIL = 'no-reply@audio.wolnelektury.pl'
172 EMAIL_HOST = 'localhost'
175 CELERY_BROKER_URL = 'redis://localhost:6379/0'
178 from .localsettings import *