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.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
20 'NAME': 'wl', # Or path to database file if using sqlite3.
21 'USER': 'wl', # Not used with sqlite3.
22 'PASSWORD': 'test', # Not used with sqlite3.
23 'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3.
24 'PORT': '', # Set to empty string for default. Not used with sqlite3.
29 "init_command": "SET storage_engine=INNODB DEFAULT CHARSET=utf8",
33 # Local time zone for this installation. Choices can be found here:
34 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
35 # although not all choices may be available on all operating systems.
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 LANGUAGES = tuple(sorted([
54 ('uk', u'українська'),
55 ], key=lambda x: x[0]))
60 # If you set this to False, Django will make some optimizations so as not
61 # to load the internationalization machinery.
64 # Absolute path to the directory that holds media.
65 # Example: "/home/media/media.lawrence.com/"
66 MEDIA_ROOT = path.join(PROJECT_DIR, '../media/')
67 STATIC_ROOT = path.join(PROJECT_DIR, 'static/')
68 SEARCH_INDEX = path.join(MEDIA_ROOT, 'search/')
70 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
71 # trailing slash if there is a path component (optional in other cases).
72 # Examples: "http://media.lawrence.com", "http://example.com/media/"
74 STATIC_URL = '/static/'
76 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
78 # Examples: "http://foo.com/media/", "/media/".
79 ADMIN_MEDIA_PREFIX = '/admin-media/'
81 # Make this unique, and don't share it with anybody.
83 # List of callables that know how to import templates from various sources.
85 'django.template.loaders.filesystem.Loader',
86 'django.template.loaders.app_directories.Loader',
87 # 'django.template.loaders.eggs.Loader',
90 TEMPLATE_CONTEXT_PROCESSORS = (
91 'django.contrib.auth.context_processors.auth',
92 'django.core.context_processors.debug',
93 'django.core.context_processors.i18n',
94 'django.core.context_processors.media',
95 'django.core.context_processors.request',
96 'wolnelektury.context_processors.extra_settings',
97 'search.context_processors.search_form',
100 MIDDLEWARE_CLASSES = [
101 'django.middleware.cache.UpdateCacheMiddleware',
102 'django.middleware.common.CommonMiddleware',
103 'django.contrib.sessions.middleware.SessionMiddleware',
104 'django.contrib.auth.middleware.AuthenticationMiddleware',
105 'django.middleware.doc.XViewMiddleware',
106 'pagination.middleware.PaginationMiddleware',
107 'django.middleware.locale.LocaleMiddleware',
108 'piwik.django.middleware.PiwikMiddleware',
109 'maintenancemode.middleware.MaintenanceModeMiddleware',
110 'django.middleware.common.CommonMiddleware',
111 'django.middleware.cache.FetchFromCacheMiddleware',
114 ROOT_URLCONF = 'wolnelektury.urls'
117 path.join(PROJECT_DIR, 'templates'),
120 LOGIN_URL = '/uzytkownicy/zaloguj/'
122 LOGIN_REDIRECT_URL = '/'
126 'django.contrib.auth',
127 'django.contrib.contenttypes',
128 'django.contrib.sessions',
129 'django.contrib.sites',
130 'django.contrib.admin',
131 'django.contrib.admindocs',
169 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
175 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
182 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
183 'LOCATION': path.join(PROJECT_DIR, 'django_cache/'),
188 CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True
190 # CSS and JavaScript file groups
193 #'source_filenames': ('css/master.css', 'css/jquery.autocomplete.css', 'css/master.plain.css', 'css/facelist_2-0.css',),
194 'source_filenames': [
195 'css/jquery.countdown.css',
201 'css/picture_box.css',
206 'css/ui-lightness/jquery-ui-1.8.16.custom.css',
208 'output_filename': 'css/all.min?.css',
211 'source_filenames': ('css/master.book.css',),
212 'output_filename': 'css/book.min?.css',
215 'source_filenames': [
216 'jplayer/jplayer.blue.monday.css',
218 'output_filename': 'css/player.min?.css',
221 'source_filenames': ('css/simple.css',),
222 'output_filename': 'css/simple.min?.css',
228 'source_filenames': (
229 'js/jquery.cycle.min.js',
230 'js/jquery.jqmodal.js',
232 'js/jquery.countdown.js', 'js/jquery.countdown-pl.js',
233 'js/jquery.countdown-de.js', 'js/jquery.countdown-uk.js',
234 'js/jquery.countdown-es.js', 'js/jquery.countdown-lt.js',
235 'js/jquery.countdown-ru.js', 'js/jquery.countdown-fr.js',
237 'js/jquery-ui-1.8.16.custom.min.js',
247 'js/jquery.labelify.js',
249 'output_filename': 'js/base?.min.js',
252 'source_filenames': [
253 'jplayer/jquery.jplayer.min.js',
254 'jplayer/jplayer.playlist.min.js',
257 'output_filename': 'js/player.min?.js',
260 'source_filenames': ('js/jquery.eventdelegation.js', 'js/jquery.scrollto.js', 'js/jquery.highlightfade.js', 'js/book.js',),
261 'output_filename': 'js/book?.min.js',
264 'source_filenames': ('js/ierange-m2.js',),
265 'output_filename': 'js/book_ie?.min.js',
270 COMPRESS_VERSION = True
271 COMPRESS_CSS_FILTERS = None
273 THUMBNAIL_QUALITY = 95
274 THUMBNAIL_EXTENSION = 'png'
276 THUMBNAIL_PROCESSORS = (
278 'sorl.thumbnail.processors.colorspace',
279 'sorl.thumbnail.processors.autocrop',
280 'sorl.thumbnail.processors.scale_and_crop',
281 'sorl.thumbnail.processors.filters',
283 'sponsors.processors.add_padding',
286 TRANSLATION_REGISTRY = "wolnelektury.translation"
289 # seconds until a changes appears in the changes api
292 # limit number of filtering tags
295 NO_BUILD_EPUB = False
299 NO_SEARCH_INDEX = False
301 ALL_EPUB_ZIP = 'wolnelektury_pl_epub'
302 ALL_PDF_ZIP = 'wolnelektury_pl_pdf'
303 ALL_MOBI_ZIP = 'wolnelektury_pl_mobi'
305 CATALOGUE_DEFAULT_LANGUAGE = 'pol'
306 PUBLISH_PLAN_FEED = 'http://redakcja.wolnelektury.pl/documents/track/editor-proofreading/'
308 PAGINATION_INVALID_PAGE_RAISES_404 = True
311 djcelery.setup_loader()
313 BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
314 BROKER_HOST = "localhost"
316 BROKER_USER = "guest"
317 BROKER_PASSWORD = "guest"
320 CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
322 # Load localsettings, if they exist
324 from localsettings import *