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'українська'),
51 # ('it', u'italiano'),
52 ], key=lambda x: x[0]))
57 # If you set this to False, Django will make some optimizations so as not
58 # to load the internationalization machinery.
61 # Absolute path to the directory that holds media.
62 # Example: "/home/media/media.lawrence.com/"
63 MEDIA_ROOT = path.join(PROJECT_DIR, '../media/')
64 STATIC_ROOT = path.join(PROJECT_DIR, 'static/')
65 SEARCH_INDEX = path.join(MEDIA_ROOT, 'search/')
67 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
68 # trailing slash if there is a path component (optional in other cases).
69 # Examples: "http://media.lawrence.com", "http://example.com/media/"
71 STATIC_URL = '/static/'
73 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
75 # Examples: "http://foo.com/media/", "/media/".
76 ADMIN_MEDIA_PREFIX = '/admin-media/'
78 # Make this unique, and don't share it with anybody.
80 # List of callables that know how to import templates from various sources.
82 'django.template.loaders.filesystem.Loader',
83 'django.template.loaders.app_directories.Loader',
84 # 'django.template.loaders.eggs.Loader',
87 TEMPLATE_CONTEXT_PROCESSORS = (
88 'django.contrib.auth.context_processors.auth',
89 'django.core.context_processors.debug',
90 'django.core.context_processors.i18n',
91 'django.core.context_processors.media',
92 'django.core.context_processors.request',
93 'wolnelektury.context_processors.extra_settings',
94 'search.context_processors.search_form',
95 "allauth.context_processors.allauth",
96 "allauth.account.context_processors.account",
99 MIDDLEWARE_CLASSES = [
100 'django.middleware.cache.UpdateCacheMiddleware',
101 'django.middleware.common.CommonMiddleware',
102 'django.contrib.sessions.middleware.SessionMiddleware',
103 'django.contrib.auth.middleware.AuthenticationMiddleware',
104 'django.middleware.doc.XViewMiddleware',
105 'pagination.middleware.PaginationMiddleware',
106 'django.middleware.locale.LocaleMiddleware',
107 'piwik.django.middleware.PiwikMiddleware',
108 'maintenancemode.middleware.MaintenanceModeMiddleware',
109 'django.middleware.common.CommonMiddleware',
110 'django.middleware.cache.FetchFromCacheMiddleware',
111 'django.contrib.messages.middleware.MessageMiddleware',
114 ROOT_URLCONF = 'wolnelektury.urls'
117 path.join(PROJECT_DIR, 'templates'),
121 AUTHENTICATION_BACKENDS = [
122 'django.contrib.auth.backends.ModelBackend',
123 'allauth.account.auth_backends.AuthenticationBackend',
125 EMAIL_CONFIRMATION_DAYS = 2
126 LOGIN_URL = '/uzytkownik/login/'
128 LOGIN_REDIRECT_URL = '/'
132 'django.contrib.auth',
133 'django.contrib.contenttypes',
134 'django.contrib.sessions',
135 'django.contrib.sites',
136 'django.contrib.admin',
137 'django.contrib.admindocs',
153 'allauth.socialaccount',
185 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
191 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
198 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
199 'LOCATION': path.join(PROJECT_DIR, 'django_cache/'),
204 CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True
206 # CSS and JavaScript file groups
209 #'source_filenames': ('css/master.css', 'css/jquery.autocomplete.css', 'css/master.plain.css', 'css/facelist_2-0.css',),
210 'source_filenames': [
211 'css/jquery.countdown.css',
218 'css/picture_box.css',
225 'css/social/shelf_tags.css',
226 'css/ui-lightness/jquery-ui-1.8.16.custom.css',
228 'output_filename': 'css/all.min?.css',
231 'source_filenames': ['css/screen.css'],
232 'output_filename': 'css/screen.min?.css',
234 'media': 'screen and (min-width: 800px)',
238 'source_filenames': [
241 'output_filename': 'css/ie.min?.css',
244 'source_filenames': [
246 'css/master.book.css',
248 'output_filename': 'css/book.min?.css',
251 'source_filenames': [
252 'jplayer/jplayer.blue.monday.css',
255 'output_filename': 'css/player.min?.css',
258 'source_filenames': ('css/simple.css',),
259 'output_filename': 'css/simple.min?.css',
265 'source_filenames': (
266 'js/jquery.cycle.min.js',
267 'js/jquery.jqmodal.js',
269 'js/jquery.countdown.js', 'js/jquery.countdown-pl.js',
270 'js/jquery.countdown-de.js', 'js/jquery.countdown-uk.js',
271 'js/jquery.countdown-es.js', 'js/jquery.countdown-lt.js',
272 'js/jquery.countdown-ru.js', 'js/jquery.countdown-fr.js',
274 'js/jquery-ui-1.8.16.custom.min.js',
284 'output_filename': 'js/base?.min.js',
287 'source_filenames': [
288 'jplayer/jquery.jplayer.min.js',
289 'jplayer/jplayer.playlist.min.js',
292 'output_filename': 'js/player.min?.js',
295 'source_filenames': ('js/jquery.eventdelegation.js', 'js/jquery.scrollto.js', 'js/jquery.highlightfade.js', 'js/book.js',),
296 'output_filename': 'js/book?.min.js',
299 'source_filenames': ('js/ierange-m2.js',),
300 'output_filename': 'js/book_ie?.min.js',
305 COMPRESS_VERSION = True
306 COMPRESS_CSS_FILTERS = None
308 THUMBNAIL_QUALITY = 95
310 TRANSLATION_REGISTRY = "wolnelektury.translation"
313 # seconds until a changes appears in the changes api
316 # limit number of filtering tags
319 NO_BUILD_EPUB = False
323 NO_SEARCH_INDEX = False
325 ALL_EPUB_ZIP = 'wolnelektury_pl_epub'
326 ALL_PDF_ZIP = 'wolnelektury_pl_pdf'
327 ALL_MOBI_ZIP = 'wolnelektury_pl_mobi'
329 CATALOGUE_DEFAULT_LANGUAGE = 'pol'
330 PUBLISH_PLAN_FEED = 'http://redakcja.wolnelektury.pl/documents/track/editor-proofreading/'
332 PAGINATION_INVALID_PAGE_RAISES_404 = True
335 djcelery.setup_loader()
337 BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
338 BROKER_HOST = "localhost"
340 BROKER_USER = "guest"
341 BROKER_PASSWORD = "guest"
344 CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
347 path.join(PROJECT_DIR, '../locale-contrib')
350 # Load localsettings, if they exist
352 from localsettings import *