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'),
17 DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
18 DATABASE_NAME = path.join(PROJECT_DIR, 'dev.db') # Or path to database file if using sqlite3.
19 DATABASE_USER = '' # Not used with sqlite3.
20 DATABASE_PASSWORD = '' # Not used with sqlite3.
21 DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
22 DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
24 # Local time zone for this installation. Choices can be found here:
25 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
26 # although not all choices may be available on all operating systems.
27 # If running in a Windows environment this must be set to the same as your
29 TIME_ZONE = 'Europe/Warsaw Poland'
31 # Language code for this installation. All choices can be found here:
32 # http://www.i18nguy.com/unicode/language-identifiers.html
37 LANGUAGES = tuple(sorted([
45 ('uk', u'українська'),
46 ], key=lambda x: x[0]))
51 # If you set this to False, Django will make some optimizations so as not
52 # to load the internationalization machinery.
55 # Absolute path to the directory that holds media.
56 # Example: "/home/media/media.lawrence.com/"
57 MEDIA_ROOT = path.join(PROJECT_DIR, '../media')
58 STATIC_ROOT = path.join(PROJECT_DIR, 'static')
60 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
61 # trailing slash if there is a path component (optional in other cases).
62 # Examples: "http://media.lawrence.com", "http://example.com/media/"
64 STATIC_URL = '/static/'
66 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
68 # Examples: "http://foo.com/media/", "/media/".
69 ADMIN_MEDIA_PREFIX = '/admin-media/'
71 # Make this unique, and don't share it with anybody.
73 # List of callables that know how to import templates from various sources.
75 'django.template.loaders.filesystem.load_template_source',
76 'django.template.loaders.app_directories.load_template_source',
77 # 'django.template.loaders.eggs.load_template_source',
80 TEMPLATE_CONTEXT_PROCESSORS = [
81 'django.core.context_processors.auth',
82 'django.core.context_processors.debug',
83 'django.core.context_processors.i18n',
84 'django.core.context_processors.media',
85 'django.core.context_processors.request',
86 'wolnelektury.context_processors.extra_settings',
89 MIDDLEWARE_CLASSES = [
90 'django.middleware.common.CommonMiddleware',
91 'django.contrib.sessions.middleware.SessionMiddleware',
92 'django.contrib.auth.middleware.AuthenticationMiddleware',
93 'django.middleware.doc.XViewMiddleware',
94 'pagination.middleware.PaginationMiddleware',
95 'django.middleware.locale.LocaleMiddleware',
97 'maintenancemode.middleware.MaintenanceModeMiddleware',
100 ROOT_URLCONF = 'wolnelektury.urls'
103 path.join(PROJECT_DIR, 'templates'),
106 LOGIN_URL = '/uzytkownicy/zaloguj/'
108 LOGIN_REDIRECT_URL = '/'
112 'django.contrib.auth',
113 'django.contrib.contenttypes',
114 'django.contrib.sessions',
115 'django.contrib.sites',
116 'django.contrib.admin',
117 'django.contrib.admindocs',
137 CACHE_BACKEND = 'locmem:///?max_entries=3000'
139 # CSS and JavaScript file groups
142 'source_filenames': ('css/master.css', 'css/jquery.autocomplete.css', 'css/jquery.countdown.css', 'css/master.plain.css', 'css/sponsors.css', 'css/facelist_2-0.css',),
143 'output_filename': 'css/all.min?.css',
146 'source_filenames': ('css/master.book.css',),
147 'output_filename': 'css/book.min?.css',
153 'source_filenames': ('js/jquery.js',),
154 'output_filename': 'js/jquery.min.js',
157 'source_filenames': ('js/jquery.autocomplete.js', 'js/jquery.form.js',
158 'js/jquery.countdown.js', 'js/jquery.countdown-pl.js',
159 'js/jquery.countdown-de.js', 'js/jquery.countdown-uk.js',
160 'js/jquery.countdown-es.js', 'js/jquery.countdown-lt.js',
161 'js/jquery.countdown-ru.js', 'js/jquery.countdown-fr.js',
162 'js/jquery.marquee.js',
163 'js/jquery.jqmodal.js', 'js/jquery.labelify.js', 'js/catalogue.js',
165 'output_filename': 'js/all?.min.js',
168 'source_filenames': ('js/jquery.eventdelegation.js', 'js/jquery.scrollto.js', 'js/jquery.highlightfade.js', 'js/book.js',),
169 'output_filename': 'js/book?.min.js',
173 COMPRESS_VERSION = True
174 COMPRESS_CSS_FILTERS = None
176 THUMBNAIL_QUALITY = 95
177 THUMBNAIL_EXTENSION = 'png'
179 THUMBNAIL_PROCESSORS = (
181 'sorl.thumbnail.processors.colorspace',
182 'sorl.thumbnail.processors.autocrop',
183 'sorl.thumbnail.processors.scale_and_crop',
184 'sorl.thumbnail.processors.filters',
186 'sponsors.processors.add_padding',
189 TRANSLATION_REGISTRY = "wolnelektury.translation"
191 # limit number of filtering tags
194 # Load localsettings, if they exist
196 from localsettings import *