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.
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/')
63 SEARCH_INDEX = path.join(MEDIA_ROOT, 'search/')
65 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
66 # trailing slash if there is a path component (optional in other cases).
67 # Examples: "http://media.lawrence.com", "http://example.com/media/"
69 STATIC_URL = '/static/'
71 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
73 # Examples: "http://foo.com/media/", "/media/".
74 ADMIN_MEDIA_PREFIX = '/admin-media/'
76 # Make this unique, and don't share it with anybody.
78 # List of callables that know how to import templates from various sources.
80 'django.template.loaders.filesystem.Loader',
81 'django.template.loaders.app_directories.Loader',
82 # 'django.template.loaders.eggs.Loader',
85 TEMPLATE_CONTEXT_PROCESSORS = (
86 'django.contrib.auth.context_processors.auth',
87 'django.core.context_processors.debug',
88 'django.core.context_processors.i18n',
89 'django.core.context_processors.media',
90 'django.core.context_processors.request',
91 'wolnelektury.context_processors.extra_settings',
92 'search.context_processors.search_form',
95 MIDDLEWARE_CLASSES = [
96 'django.middleware.cache.UpdateCacheMiddleware',
97 'django.middleware.common.CommonMiddleware',
98 'django.contrib.sessions.middleware.SessionMiddleware',
99 'django.contrib.auth.middleware.AuthenticationMiddleware',
100 'django.middleware.doc.XViewMiddleware',
101 'pagination.middleware.PaginationMiddleware',
102 'django.middleware.locale.LocaleMiddleware',
103 'piwik.django.middleware.PiwikMiddleware',
104 'maintenancemode.middleware.MaintenanceModeMiddleware',
105 'django.middleware.common.CommonMiddleware',
106 'django.middleware.cache.FetchFromCacheMiddleware',
109 ROOT_URLCONF = 'wolnelektury.urls'
112 path.join(PROJECT_DIR, 'templates'),
115 LOGIN_URL = '/uzytkownicy/zaloguj/'
117 LOGIN_REDIRECT_URL = '/'
121 'django.contrib.auth',
122 'django.contrib.contenttypes',
123 'django.contrib.sessions',
124 'django.contrib.sites',
125 'django.contrib.admin',
126 'django.contrib.admindocs',
164 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
170 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
177 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
178 'LOCATION': path.join(PROJECT_DIR, 'django_cache/'),
183 CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True
185 # CSS and JavaScript file groups
188 #'source_filenames': ('css/master.css', 'css/jquery.autocomplete.css', 'css/master.plain.css', 'css/facelist_2-0.css',),
189 'source_filenames': [
190 'css/jquery.countdown.css',
197 'css/picture_box.css',
202 'css/social/shelf_tags.css',
203 'css/ui-lightness/jquery-ui-1.8.16.custom.css',
205 'output_filename': 'css/all.min?.css',
208 'source_filenames': [
211 'output_filename': 'css/ie.min?.css',
214 'source_filenames': ('css/master.book.css',),
215 'output_filename': 'css/book.min?.css',
218 'source_filenames': [
219 'jplayer/jplayer.blue.monday.css',
221 'output_filename': 'css/player.min?.css',
224 'source_filenames': ('css/simple.css',),
225 'output_filename': 'css/simple.min?.css',
231 'source_filenames': (
232 'js/jquery.cycle.min.js',
233 'js/jquery.jqmodal.js',
235 'js/jquery.countdown.js', 'js/jquery.countdown-pl.js',
236 'js/jquery.countdown-de.js', 'js/jquery.countdown-uk.js',
237 'js/jquery.countdown-es.js', 'js/jquery.countdown-lt.js',
238 'js/jquery.countdown-ru.js', 'js/jquery.countdown-fr.js',
240 'js/jquery-ui-1.8.16.custom.min.js',
250 'output_filename': 'js/base?.min.js',
253 'source_filenames': [
254 'jplayer/jquery.jplayer.min.js',
255 'jplayer/jplayer.playlist.min.js',
258 'output_filename': 'js/player.min?.js',
261 'source_filenames': ('js/jquery.eventdelegation.js', 'js/jquery.scrollto.js', 'js/jquery.highlightfade.js', 'js/book.js',),
262 'output_filename': 'js/book?.min.js',
265 'source_filenames': ('js/ierange-m2.js',),
266 'output_filename': 'js/book_ie?.min.js',
271 COMPRESS_VERSION = True
272 COMPRESS_CSS_FILTERS = None
274 THUMBNAIL_QUALITY = 95
275 THUMBNAIL_EXTENSION = 'png'
277 THUMBNAIL_PROCESSORS = (
279 'sorl.thumbnail.processors.colorspace',
280 'sorl.thumbnail.processors.autocrop',
281 'sorl.thumbnail.processors.scale_and_crop',
282 'sorl.thumbnail.processors.filters',
284 'sponsors.processors.add_padding',
287 TRANSLATION_REGISTRY = "wolnelektury.translation"
290 # seconds until a changes appears in the changes api
293 # limit number of filtering tags
296 NO_BUILD_EPUB = False
300 NO_SEARCH_INDEX = False
302 ALL_EPUB_ZIP = 'wolnelektury_pl_epub'
303 ALL_PDF_ZIP = 'wolnelektury_pl_pdf'
304 ALL_MOBI_ZIP = 'wolnelektury_pl_mobi'
306 CATALOGUE_DEFAULT_LANGUAGE = 'pol'
307 PUBLISH_PLAN_FEED = 'http://redakcja.wolnelektury.pl/documents/track/editor-proofreading/'
309 PAGINATION_INVALID_PAGE_RAISES_404 = True
312 djcelery.setup_loader()
314 BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
315 BROKER_HOST = "localhost"
317 BROKER_USER = "guest"
318 BROKER_PASSWORD = "guest"
321 CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
323 # Load localsettings, if they exist
325 from localsettings import *