1 # Django settings for audiobooks project.
2 # -*- coding: utf-8 -*-
6 PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
7 sys.path.insert(0, os.path.join(PROJECT_ROOT, "../apps"))
12 TEMPLATE_DEBUG = DEBUG
15 # ('Your Name', 'your_email@example.com'),
22 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
23 'NAME': os.path.join(PROJECT_ROOT, 'dev.sqlite'), # Or path to database file if using sqlite3.
24 'USER': '', # Not used with sqlite3.
25 'PASSWORD': '', # Not used with sqlite3.
26 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
27 'PORT': '', # Set to empty string for default. Not used with sqlite3.
31 # Local time zone for this installation. Choices can be found here:
32 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
33 # although not all choices may be available on all operating systems.
34 # On Unix systems, a value of None will cause Django to use the same
35 # timezone as the operating system.
36 # If running in a Windows environment this must be set to the same as your
38 TIME_ZONE = 'Europe/Warsaw'
40 # Language code for this installation. All choices can be found here:
41 # http://www.i18nguy.com/unicode/language-identifiers.html
46 # If you set this to False, Django will make some optimizations so as not
47 # to load the internationalization machinery.
50 # If you set this to False, Django will not format dates, numbers and
51 # calendars according to the current locale
54 # Absolute filesystem path to the directory that will hold user-uploaded files.
55 # Example: "/home/media/media.lawrence.com/media/"
56 MEDIA_ROOT = os.path.join(PROJECT_ROOT, '../media')
58 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
60 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
63 # Absolute path to the directory static files should be collected to.
64 # Don't put anything in this directory yourself; store your static files
65 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
66 # Example: "/home/media/media.lawrence.com/static/"
69 # URL prefix for static files.
70 # Example: "http://media.lawrence.com/static/"
71 STATIC_URL = '/static/'
73 # URL prefix for admin static files -- CSS, JavaScript and images.
74 # Make sure to use a trailing slash.
75 # Examples: "http://foo.com/static/admin/", "/static/admin/".
76 ADMIN_MEDIA_PREFIX = '/static/admin/'
78 # Additional locations of static files
80 # Put strings here, like "/home/html/static" or "C:/www/django/static".
81 # Always use forward slashes, even on Windows.
82 # Don't forget to use absolute paths, not relative paths.
85 # List of finder classes that know how to find static files in
87 STATICFILES_FINDERS = (
88 'django.contrib.staticfiles.finders.FileSystemFinder',
89 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
90 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
93 # Make this unique, and don't share it with anybody.
94 SECRET_KEY = '8ehk^-+pr(o)k6lh_gl9+ks6gkd9u#fka7fv%ikpk(c%llqa6%'
96 # List of callables that know how to import templates from various sources.
98 'django.template.loaders.filesystem.Loader',
99 'django.template.loaders.app_directories.Loader',
100 # 'django.template.loaders.eggs.Loader',
103 MIDDLEWARE_CLASSES = (
104 'django.middleware.common.CommonMiddleware',
105 'django.contrib.sessions.middleware.SessionMiddleware',
106 'django.middleware.csrf.CsrfViewMiddleware',
107 'django.contrib.auth.middleware.AuthenticationMiddleware',
108 'django_cas.middleware.CASMiddleware',
109 'django.contrib.messages.middleware.MessageMiddleware',
112 AUTHENTICATION_BACKENDS = (
113 'django.contrib.auth.backends.ModelBackend',
114 'django_cas.backends.CASBackend',
117 ROOT_URLCONF = 'audiobooks.urls'
120 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
121 # Always use forward slashes, even on Windows.
122 # Don't forget to use absolute paths, not relative paths.
126 'django.contrib.auth',
127 'django.contrib.contenttypes',
128 'django.contrib.sessions',
129 'django.contrib.sites',
130 'django.contrib.messages',
131 'django.contrib.staticfiles',
132 # Uncomment the next line to enable the admin:
133 'django.contrib.admin',
134 # Uncomment the next line to enable admin documentation:
135 # 'django.contrib.admindocs',
144 # A sample logging configuration. The only tangible logging
145 # performed by this configuration is to send an email to
146 # the site admins on every HTTP 500 error.
147 # See http://docs.djangoproject.com/en/dev/topics/logging for
148 # more details on how to customize your logging configuration.
151 'disable_existing_loggers': False,
155 'class': 'django.utils.log.AdminEmailHandler'
160 'handlers': ['mail_admins'],
167 #http://logowanie.nowoczesnapolska.org.pl/cas/'
168 CAS_SERVER_URL = "http://logowanie.nowoczesnapolska.org.pl/cas/"
172 EMAIL_SUBJECT_PREFIX = '[Audio] '
173 SERVER_EMAIL = 'no-reply@audio.wolnelektury.pl'
174 EMAIL_HOST = 'localhost'
178 djcelery.setup_loader()
180 CELERY_SEND_TASK_ERROR_EMAILS = True
181 BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
182 BROKER_HOST = "localhost"
184 BROKER_USER = "guest"
185 BROKER_PASSWORD = "guest"
190 from localsettings import *