1 # Django settings for wolnelektury project.
 
   4 PROJECT_DIR = path.abspath(path.dirname(__file__))
 
   8 MAINTENANCE_MODE = False
 
  11     # ('Your Name', 'your_email@domain.com'),
 
  16 DATABASE_ENGINE = 'sqlite3'    # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
 
  17 DATABASE_NAME = path.join(PROJECT_DIR, 'dev.db')  # Or path to database file if using sqlite3.
 
  18 DATABASE_USER = ''             # Not used with sqlite3.
 
  19 DATABASE_PASSWORD = ''         # Not used with sqlite3.
 
  20 DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
 
  21 DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
 
  23 # Local time zone for this installation. Choices can be found here:
 
  24 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
 
  25 # although not all choices may be available on all operating systems.
 
  26 # If running in a Windows environment this must be set to the same as your
 
  28 TIME_ZONE = 'Europe/Warsaw Poland'
 
  30 # Language code for this installation. All choices can be found here:
 
  31 # http://www.i18nguy.com/unicode/language-identifiers.html
 
  37     ('pl', gettext('Polish')),
 
  38     ('de', gettext('German')),
 
  39     ('en', gettext('English')),
 
  40     ('lt', gettext('Lithuanian')),
 
  41     ('fr', gettext('French')),
 
  42     ('ru', gettext('Russian')),
 
  43     ('es', gettext('Spanish')),
 
  44     ('uk', gettext('Ukrainian')),
 
  50 # If you set this to False, Django will make some optimizations so as not
 
  51 # to load the internationalization machinery.
 
  54 # Absolute path to the directory that holds media.
 
  55 # Example: "/home/media/media.lawrence.com/"
 
  56 MEDIA_ROOT = path.join(PROJECT_DIR, '../media')
 
  57 STATIC_ROOT = path.join(PROJECT_DIR, 'static')
 
  59 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
 
  60 # trailing slash if there is a path component (optional in other cases).
 
  61 # Examples: "http://media.lawrence.com", "http://example.com/media/"
 
  63 STATIC_URL = '/static/'
 
  65 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
 
  67 # Examples: "http://foo.com/media/", "/media/".
 
  68 ADMIN_MEDIA_PREFIX = '/admin-media/'
 
  70 # Make this unique, and don't share it with anybody.
 
  72 # List of callables that know how to import templates from various sources.
 
  74     'django.template.loaders.filesystem.load_template_source',
 
  75     'django.template.loaders.app_directories.load_template_source',
 
  76 #     'django.template.loaders.eggs.load_template_source',
 
  79 TEMPLATE_CONTEXT_PROCESSORS = [
 
  80     'django.core.context_processors.auth',
 
  81     'django.core.context_processors.debug',
 
  82     'django.core.context_processors.i18n',
 
  83     'django.core.context_processors.media',
 
  84     'django.core.context_processors.request',
 
  85     'wolnelektury.context_processors.extra_settings',
 
  88 MIDDLEWARE_CLASSES = [
 
  89     'django.middleware.common.CommonMiddleware',
 
  90     'django.contrib.sessions.middleware.SessionMiddleware',
 
  91     'django.contrib.auth.middleware.AuthenticationMiddleware',
 
  92     'django.middleware.doc.XViewMiddleware',
 
  93     'pagination.middleware.PaginationMiddleware',
 
  94     'django.middleware.locale.LocaleMiddleware',
 
  96     'maintenancemode.middleware.MaintenanceModeMiddleware',
 
  99 ROOT_URLCONF = 'wolnelektury.urls'
 
 102     path.join(PROJECT_DIR, 'templates'),
 
 105 LOGIN_URL = '/uzytkownicy/zaloguj/'
 
 107 LOGIN_REDIRECT_URL = '/'
 
 111     'django.contrib.auth',
 
 112     'django.contrib.contenttypes',
 
 113     'django.contrib.sessions',
 
 114     'django.contrib.sites',
 
 115     'django.contrib.admin',
 
 116     'django.contrib.admindocs',
 
 135 CACHE_BACKEND = 'locmem:///?max_entries=3000'
 
 137 # CSS and JavaScript file groups
 
 140         'source_filenames': ('css/master.css', 'css/jquery.autocomplete.css', 'css/jquery.countdown.css', 'css/master.plain.css', 'css/sponsors.css',),
 
 141         'output_filename': 'css/all.min?.css',
 
 144         'source_filenames': ('css/master.book.css',),
 
 145         'output_filename': 'css/book.min?.css',
 
 151         'source_filenames': ('js/jquery.js',),
 
 152         'output_filename': 'js/jquery.min.js',
 
 155         'source_filenames': ('js/jquery.autocomplete.js', 'js/jquery.form.js', 
 
 156             'js/jquery.countdown.js', 'js/jquery.countdown-pl.js', 
 
 157             'js/jquery.countdown-de.js', 'js/jquery.countdown-uk.js',
 
 158             'js/jquery.countdown-es.js', 'js/jquery.countdown-lt.js',
 
 159             'js/jquery.countdown-ru.js', 'js/jquery.countdown-fr.js',
 
 160             'js/jquery.jqmodal.js', 'js/jquery.labelify.js', 'js/catalogue.js',
 
 161             'js/jquery.cookie.js',),
 
 162         'output_filename': 'js/all?.min.js',
 
 165         'source_filenames': ('js/jquery.eventdelegation.js', 'js/jquery.scrollto.js', 'js/jquery.highlightfade.js', 'js/book.js',),
 
 166         'output_filename': 'js/book?.min.js',
 
 170 COMPRESS_VERSION = True
 
 171 COMPRESS_CSS_FILTERS = None
 
 173 THUMBNAIL_QUALITY = 95
 
 174 THUMBNAIL_EXTENSION = 'png'
 
 176 THUMBNAIL_PROCESSORS = (
 
 178     'sorl.thumbnail.processors.colorspace',
 
 179     'sorl.thumbnail.processors.autocrop',
 
 180     'sorl.thumbnail.processors.scale_and_crop',
 
 181     'sorl.thumbnail.processors.filters',
 
 183     'sponsors.processors.add_padding',
 
 186 TRANSLATION_REGISTRY = "wolnelektury.translation"
 
 188 # Load localsettings, if they exist
 
 190     from localsettings import *