1 # -*- coding: utf-8 -*-
2 # Base settings for {{ project_name }} project.
3 from __future__ import unicode_literals
7 PROJECT_DIR = path.dirname(path.dirname(path.dirname(path.abspath(path.dirname(__file__)))))
18 # Disable, if not using Piwik.
21 'django.contrib.admin',
22 'django.contrib.auth',
23 'django.contrib.contenttypes',
24 'django.contrib.messages',
25 'django.contrib.sessions',
26 'django.contrib.staticfiles',
36 MEDIA_ROOT = path.join(PROJECT_DIR, 'var/media/')
39 MIDDLEWARE_CLASSES = [
40 'django.contrib.sessions.middleware.SessionMiddleware',
41 #'django.middleware.locale.LocaleMiddleware',
42 'fnpdjango.middleware.URLLocaleMiddleware',
43 'django.middleware.common.CommonMiddleware',
44 'django.middleware.csrf.CsrfViewMiddleware',
45 'django.contrib.auth.middleware.AuthenticationMiddleware',
46 'django_cas_ng.middleware.CASMiddleware', # Remove if not using CAS.
47 'django.contrib.messages.middleware.MessageMiddleware',
48 'fnpdjango.middleware.SetRemoteAddrFromXRealIP'
51 ROOT_URLCONF = '{{ project_name }}.urls'
55 'BACKEND': 'django.template.backends.django.DjangoTemplates',
58 'context_processors': [
59 'django.template.context_processors.request',
60 'django.contrib.auth.context_processors.auth',
61 'django.contrib.messages.context_processors.messages',
62 'django.template.context_processors.i18n',
69 TIME_ZONE = 'Europe/Warsaw'
73 WSGI_APPLICATION = '{{ project_name }}.wsgi.application'
80 # Remove if not using CAS.
81 AUTHENTICATION_BACKENDS = (
82 'django.contrib.auth.backends.ModelBackend',
83 'django_cas_ng.backends.CASBackend',
90 STATIC_ROOT = path.join(PROJECT_DIR, 'var/static/')
91 STATIC_URL = '/static/'
92 STATICFILES_STORAGE = 'fnpdjango.utils.pipeline_storage.GzipPipelineCachedStorage'
94 STATICFILES_FINDERS = [
95 'django.contrib.staticfiles.finders.FileSystemFinder',
96 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
97 'pipeline.finders.PipelineFinder',
105 CAS_SERVER_URL = 'https://logowanie.nowoczesnapolska.org.pl/cas/'
115 'source_filenames': (
118 'output_filename': 'compressed/base.css',
124 'source_filenames': (
127 'output_filename': 'compressed/base.js',
131 PIPELINE_CSS_COMPRESSOR = None
132 PIPELINE_JS_COMPRESSOR = None
134 PIPELINE_COMPILERS = (
135 'pipeline.compilers.sass.SASSCompiler',