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.
27 DATABASES['default'] = {
28 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
29 'NAME': 'mkoziej_wl', # Or path to database file if using sqlite3.
30 'USER': 'mkoziej', # Not used with sqlite3.
31 'PASSWORD': 'pelolpe', # Not used with sqlite3.
35 "init_command": "SET storage_engine=INNODB DEFAULT CHARSET=utf8",
40 # Local time zone for this installation. Choices can be found here:
41 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
42 # although not all choices may be available on all operating systems.
43 # If running in a Windows environment this must be set to the same as your
45 TIME_ZONE = 'Europe/Warsaw'
47 # Language code for this installation. All choices can be found here:
48 # http://www.i18nguy.com/unicode/language-identifiers.html
53 LANGUAGES = tuple(sorted([
61 ('uk', u'українська'),
62 ], key=lambda x: x[0]))
67 # If you set this to False, Django will make some optimizations so as not
68 # to load the internationalization machinery.
71 # Absolute path to the directory that holds media.
72 # Example: "/home/media/media.lawrence.com/"
73 MEDIA_ROOT = path.join(PROJECT_DIR, '../media/')
74 STATIC_ROOT = path.join(PROJECT_DIR, 'static/')
75 SEARCH_INDEX = path.join(MEDIA_ROOT, 'search/')
77 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
78 # trailing slash if there is a path component (optional in other cases).
79 # Examples: "http://media.lawrence.com", "http://example.com/media/"
81 STATIC_URL = '/static/'
83 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
85 # Examples: "http://foo.com/media/", "/media/".
86 ADMIN_MEDIA_PREFIX = '/admin-media/'
88 # Make this unique, and don't share it with anybody.
90 # List of callables that know how to import templates from various sources.
92 'django.template.loaders.filesystem.Loader',
93 'django.template.loaders.app_directories.Loader',
94 # 'django.template.loaders.eggs.Loader',
97 TEMPLATE_CONTEXT_PROCESSORS = (
98 'django.contrib.auth.context_processors.auth',
99 'django.core.context_processors.debug',
100 'django.core.context_processors.i18n',
101 'django.core.context_processors.media',
102 'django.core.context_processors.request',
103 'wolnelektury.context_processors.extra_settings',
104 'search.context_processors.search_form',
107 MIDDLEWARE_CLASSES = [
108 'django.middleware.cache.UpdateCacheMiddleware',
109 'django.middleware.common.CommonMiddleware',
110 'django.contrib.sessions.middleware.SessionMiddleware',
111 'django.contrib.auth.middleware.AuthenticationMiddleware',
112 'django.middleware.doc.XViewMiddleware',
113 'pagination.middleware.PaginationMiddleware',
114 'django.middleware.locale.LocaleMiddleware',
115 'piwik.django.middleware.PiwikMiddleware',
116 'maintenancemode.middleware.MaintenanceModeMiddleware',
117 'django.middleware.common.CommonMiddleware',
118 'django.middleware.cache.FetchFromCacheMiddleware',
121 ROOT_URLCONF = 'wolnelektury.urls'
124 path.join(PROJECT_DIR, 'templates'),
127 LOGIN_URL = '/uzytkownicy/zaloguj/'
129 LOGIN_REDIRECT_URL = '/'
133 'django.contrib.auth',
134 'django.contrib.contenttypes',
135 'django.contrib.sessions',
136 'django.contrib.sites',
137 'django.contrib.admin',
138 'django.contrib.admindocs',
176 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
182 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
189 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
190 'LOCATION': path.join(PROJECT_DIR, 'django_cache/'),
195 CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True
197 # CSS and JavaScript file groups
200 #'source_filenames': ('css/master.css', 'css/jquery.autocomplete.css', 'css/master.plain.css', 'css/facelist_2-0.css',),
201 'source_filenames': [
202 'css/jquery.countdown.css',
208 'css/picture_box.css',
213 'css/ui-lightness/jquery-ui-1.8.16.custom.css',
215 'output_filename': 'css/all.min?.css',
218 'source_filenames': ('css/master.book.css',),
219 'output_filename': 'css/book.min?.css',
222 'source_filenames': [
223 'jplayer/jplayer.blue.monday.css',
225 'output_filename': 'css/player.min?.css',
228 'source_filenames': ('css/simple.css',),
229 'output_filename': 'css/simple.min?.css',
235 'source_filenames': (
236 'js/jquery.cycle.min.js',
237 'js/jquery.jqmodal.js',
239 'js/jquery.countdown.js', 'js/jquery.countdown-pl.js',
240 'js/jquery.countdown-de.js', 'js/jquery.countdown-uk.js',
241 'js/jquery.countdown-es.js', 'js/jquery.countdown-lt.js',
242 'js/jquery.countdown-ru.js', 'js/jquery.countdown-fr.js',
244 'js/jquery-ui-1.8.16.custom.min.js',
254 'js/jquery.labelify.js',
256 'output_filename': 'js/base?.min.js',
259 'source_filenames': [
260 'jplayer/jquery.jplayer.min.js',
261 'jplayer/jplayer.playlist.min.js',
264 'output_filename': 'js/player.min?.js',
267 'source_filenames': ('js/jquery.eventdelegation.js', 'js/jquery.scrollto.js', 'js/jquery.highlightfade.js', 'js/book.js',),
268 'output_filename': 'js/book?.min.js',
271 'source_filenames': ('js/ierange-m2.js',),
272 'output_filename': 'js/book_ie?.min.js',
277 COMPRESS_VERSION = True
278 COMPRESS_CSS_FILTERS = None
280 THUMBNAIL_QUALITY = 95
281 THUMBNAIL_EXTENSION = 'png'
283 THUMBNAIL_PROCESSORS = (
285 'sorl.thumbnail.processors.colorspace',
286 'sorl.thumbnail.processors.autocrop',
287 'sorl.thumbnail.processors.scale_and_crop',
288 'sorl.thumbnail.processors.filters',
290 'sponsors.processors.add_padding',
293 TRANSLATION_REGISTRY = "wolnelektury.translation"
296 # seconds until a changes appears in the changes api
299 # limit number of filtering tags
302 NO_BUILD_EPUB = False
306 NO_SEARCH_INDEX = False
308 ALL_EPUB_ZIP = 'wolnelektury_pl_epub'
309 ALL_PDF_ZIP = 'wolnelektury_pl_pdf'
310 ALL_MOBI_ZIP = 'wolnelektury_pl_mobi'
312 CATALOGUE_DEFAULT_LANGUAGE = 'pol'
313 PUBLISH_PLAN_FEED = 'http://redakcja.wolnelektury.pl/documents/track/editor-proofreading/'
315 PAGINATION_INVALID_PAGE_RAISES_404 = True
318 djcelery.setup_loader()
320 BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
321 BROKER_HOST = "localhost"
323 BROKER_USER = "guest"
324 BROKER_PASSWORD = "guest"
327 CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
329 # Load localsettings, if they exist
331 from localsettings import *