1 # -*- coding: utf-8 -*-
2 # This file is part of PrawoKultury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 # Django settings for prawokultury project.
11 # ('Your Name', 'your_email@example.com'),
18 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
19 'NAME': 'dev.db', # Or path to database file if using sqlite3.
20 'USER': '', # Not used with sqlite3.
21 'PASSWORD': '', # Not used with sqlite3.
22 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
23 'PORT': '', # Set to empty string for default. Not used with sqlite3.
27 # Local time zone for this installation. Choices can be found here:
28 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
29 # although not all choices may be available on all operating systems.
30 # On Unix systems, a value of None will cause Django to use the same
31 # timezone as the operating system.
32 # If running in a Windows environment this must be set to the same as your
34 TIME_ZONE = 'America/Chicago'
36 # Language code for this installation. All choices can be found here:
37 # http://www.i18nguy.com/unicode/language-identifiers.html
42 # If you set this to False, Django will make some optimizations so as not
43 # to load the internationalization machinery.
46 # If you set this to False, Django will not format dates, numbers and
47 # calendars according to the current locale.
50 # If you set this to False, Django will not use timezone-aware datetimes.
53 # Absolute filesystem path to the directory that will hold user-uploaded files.
54 # Example: "/home/media/media.lawrence.com/media/"
55 #MEDIA_ROOT = '/home/rczajka/workspace/media/prawokultury/dynamic/'
58 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
60 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
63 # Absolute path to the directory static files should be collected to.
64 # Don't put anything in this directory yourself; store your static files
65 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
66 # Example: "/home/media/media.lawrence.com/static/"
69 # URL prefix for static files.
70 # Example: "http://media.lawrence.com/static/"
71 STATIC_URL = '/static/'
73 # Additional locations of static files
75 # Put strings here, like "/home/html/static" or "C:/www/django/static".
76 # Always use forward slashes, even on Windows.
77 # Don't forget to use absolute paths, not relative paths.
80 # List of finder classes that know how to find static files in
82 STATICFILES_FINDERS = (
83 'django.contrib.staticfiles.finders.FileSystemFinder',
84 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
85 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
88 # Make this unique, and don't share it with anybody.
89 SECRET_KEY = 'a7np^jzj9=ed17(w(q%z!@gfpu^e0k$99cmto)yon$e06t(leg'
91 # List of callables that know how to import templates from various sources.
93 'django.template.loaders.filesystem.Loader',
94 'django.template.loaders.app_directories.Loader',
95 # 'django.template.loaders.eggs.Loader',
98 MIDDLEWARE_CLASSES = (
99 'django.contrib.sessions.middleware.SessionMiddleware',
100 #'django.middleware.locale.LocaleMiddleware',
101 'migdal.middleware.URLLocaleMiddleware',
103 'django.middleware.common.CommonMiddleware',
104 'django.middleware.csrf.CsrfViewMiddleware',
105 'django.contrib.auth.middleware.AuthenticationMiddleware',
106 'django.contrib.messages.middleware.MessageMiddleware',
107 # Uncomment the next line for simple clickjacking protection:
108 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
111 ROOT_URLCONF = 'prawokultury.urls'
113 # Python dotted path to the WSGI application used by Django's runserver.
114 WSGI_APPLICATION = 'prawokultury.wsgi.application'
117 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
118 # Always use forward slashes, even on Windows.
119 # Don't forget to use absolute paths, not relative paths.
129 'django.contrib.comments',
130 'django_comments_xtd',
133 'django.contrib.auth',
134 'django.contrib.contenttypes',
135 'django.contrib.sessions',
136 'django.contrib.sites',
137 'django.contrib.messages',
138 'django.contrib.staticfiles',
139 'django.contrib.admin',
140 'django.contrib.admindocs',
143 COMMENTS_APP = "django_comments_xtd"
144 COMMENTS_XTD_CONFIRM_EMAIL = False
153 # A sample logging configuration. The only tangible logging
154 # performed by this configuration is to send an email to
155 # the site admins on every HTTP 500 error when DEBUG=False.
156 # See http://docs.djangoproject.com/en/dev/topics/logging for
157 # more details on how to customize your logging configuration.
160 'disable_existing_loggers': False,
162 'require_debug_false': {
163 '()': 'django.utils.log.RequireDebugFalse'
169 'filters': ['require_debug_false'],
170 'class': 'django.utils.log.AdminEmailHandler'
175 'handlers': ['mail_admins'],
182 STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
183 PIPELINE_CSS_COMPRESSOR = None
184 PIPELINE_JS_COMPRESSOR = None
187 'source_filenames': (
190 'output_filename': 'compressed/base.css',
194 TEMPLATE_CONTEXT_PROCESSORS = (
195 "django.contrib.auth.context_processors.auth",
196 "django.core.context_processors.debug",
197 "django.core.context_processors.i18n",
198 "django.core.context_processors.media",
199 "django.core.context_processors.static",
200 "django.core.context_processors.tz",
201 "django.contrib.messages.context_processors.messages",
202 'django.core.context_processors.request',
205 from prawokultury.helpers import textile_pl
206 MARKUP_FIELD_TYPES = (
207 ('textile_pl', textile_pl),
209 EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
210 COMMENTS_XTD_LIST_URL_ACTIVE = True
211 COMMENTS_XTD_LIST_PAGINATE_BY = 10