1 # -*- coding: utf-8 -*-
2 # Django settings for wolnelektury project.
5 PROJECT_DIR = path.abspath(path.dirname(__file__))
9 MAINTENANCE_MODE = False
12 # ('Your Name', 'your_email@domain.com'),
19 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
20 'NAME': path.join(PROJECT_DIR, 'dev.db'), # 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 # If running in a Windows environment this must be set to the same as your
33 TIME_ZONE = 'Europe/Warsaw'
35 # Language code for this installation. All choices can be found here:
36 # http://www.i18nguy.com/unicode/language-identifiers.html
41 LANGUAGES = tuple(sorted([
49 ('uk', u'українська'),
50 ], key=lambda x: x[0]))
55 # If you set this to False, Django will make some optimizations so as not
56 # to load the internationalization machinery.
59 # Absolute path to the directory that holds media.
60 # Example: "/home/media/media.lawrence.com/"
61 MEDIA_ROOT = path.join(PROJECT_DIR, '../media')
62 STATIC_ROOT = path.join(PROJECT_DIR, 'static')
64 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
65 # trailing slash if there is a path component (optional in other cases).
66 # Examples: "http://media.lawrence.com", "http://example.com/media/"
68 STATIC_URL = '/static/'
70 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
72 # Examples: "http://foo.com/media/", "/media/".
73 ADMIN_MEDIA_PREFIX = '/admin-media/'
75 # Make this unique, and don't share it with anybody.
77 # List of callables that know how to import templates from various sources.
79 'django.template.loaders.filesystem.load_template_source',
80 'django.template.loaders.app_directories.load_template_source',
81 # 'django.template.loaders.eggs.load_template_source',
84 TEMPLATE_CONTEXT_PROCESSORS = (
85 'django.core.context_processors.auth',
86 'django.core.context_processors.debug',
87 'django.core.context_processors.i18n',
88 'django.core.context_processors.media',
89 'django.core.context_processors.request',
90 'wolnelektury.context_processors.extra_settings',
93 MIDDLEWARE_CLASSES = [
94 'django.middleware.cache.UpdateCacheMiddleware',
95 'django.middleware.common.CommonMiddleware',
96 'django.contrib.sessions.middleware.SessionMiddleware',
97 'django.contrib.auth.middleware.AuthenticationMiddleware',
98 'django.middleware.doc.XViewMiddleware',
99 'pagination.middleware.PaginationMiddleware',
100 'django.middleware.locale.LocaleMiddleware',
101 'piwik.django.middleware.PiwikMiddleware',
102 'maintenancemode.middleware.MaintenanceModeMiddleware',
103 'django.middleware.common.CommonMiddleware',
104 'django.middleware.cache.FetchFromCacheMiddleware',
107 ROOT_URLCONF = 'wolnelektury.urls'
110 path.join(PROJECT_DIR, 'templates'),
113 LOGIN_URL = '/uzytkownicy/zaloguj/'
115 LOGIN_REDIRECT_URL = '/'
119 'django.contrib.auth',
120 'django.contrib.contenttypes',
121 'django.contrib.sessions',
122 'django.contrib.sites',
123 'django.contrib.admin',
124 'django.contrib.admindocs',
158 #CACHE_BACKEND = 'locmem:///?max_entries=3000'
159 #CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
160 CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True
162 # CSS and JavaScript file groups
165 #'source_filenames': ('css/master.css', 'css/jquery.autocomplete.css', 'css/master.plain.css', 'css/facelist_2-0.css',),
166 'source_filenames': [
167 'css/jquery.countdown.css',
177 'output_filename': 'css/all.min?.css',
180 'source_filenames': ('css/master.book.css',),
181 'output_filename': 'css/book.min?.css',
184 'source_filenames': ('css/simple.css',),
185 'output_filename': 'css/simple.min?.css',
191 'source_filenames': (
192 'js/jquery.cycle.min.js',
193 'js/jquery.jqmodal.js',
195 'js/jquery.countdown.js', 'js/jquery.countdown-pl.js',
196 'js/jquery.countdown-de.js', 'js/jquery.countdown-uk.js',
197 'js/jquery.countdown-es.js', 'js/jquery.countdown-lt.js',
198 'js/jquery.countdown-ru.js', 'js/jquery.countdown-fr.js',
205 #~ 'js/jquery.autocomplete.js',
206 #~ 'js/jquery.labelify.js', 'js/catalogue.js',
208 'output_filename': 'js/base?.min.js',
211 #~ 'source_filenames': ('js/jquery.eventdelegation.js', 'js/jquery.scrollto.js', 'js/jquery.highlightfade.js', 'js/book.js',),
212 #~ 'source_filenames': [],
213 #~ 'output_filename': 'js/book?.min.js',
216 #~ 'source_filenames': ('js/ierange-m2.js',),
217 #~ 'source_filenames': [],
218 #~ 'output_filename': 'js/book_ie?.min.js',
223 COMPRESS_VERSION = True
224 COMPRESS_CSS_FILTERS = None
226 THUMBNAIL_QUALITY = 95
227 THUMBNAIL_EXTENSION = 'png'
229 THUMBNAIL_PROCESSORS = (
231 'sorl.thumbnail.processors.colorspace',
232 'sorl.thumbnail.processors.autocrop',
233 'sorl.thumbnail.processors.scale_and_crop',
234 'sorl.thumbnail.processors.filters',
236 'sponsors.processors.add_padding',
239 TRANSLATION_REGISTRY = "wolnelektury.translation"
242 # seconds until a changes appears in the changes api
245 # limit number of filtering tags
248 NO_BUILD_EPUB = False
251 NO_BUILD_MOBI = False
253 ALL_EPUB_ZIP = 'wolnelektury_pl_epub'
254 ALL_PDF_ZIP = 'wolnelektury_pl_pdf'
255 ALL_MOBI_ZIP = 'wolnelektury_pl_mobi'
257 CATALOGUE_DEFAULT_LANGUAGE = 'pol'
259 PAGINATION_INVALID_PAGE_RAISES_404 = True
262 djcelery.setup_loader()
264 BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
265 BROKER_HOST = "localhost"
267 BROKER_USER = "guest"
268 BROKER_PASSWORD = "guest"
272 # Load localsettings, if they exist
274 from localsettings import *