{% extends "base.html" %}
-{% load url from future %}
{% load i18n pagination_tags fnp_prevnext %}
{% load events_tags %}
{% load i18n %}
-{% load url from future %}
<ul class="event-list">
{% for event in objects %}
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from django import template
+from django.utils.timezone import now
from events import app_settings
from events.models import Event
def events_box(context, limit=app_settings.BOX_LENGTH):
lang = context['request'].LANGUAGE_CODE
objects = Event.objects.filter(**{"published_%s" % lang: True})
- objects = objects.filter(date_end__gte=datetime.now())[:limit]
+ objects = objects.filter(date_end__gte=now())[:limit]
return {'objects': objects}
# This file is part of PrawoKultury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
-from django.conf.urls import patterns, include, url
+from django.conf.urls import include, url
from django.utils.translation import string_concat, ugettext_lazy as _
+from . import views
-urlpatterns = patterns('events.views',
- url(r'^$', 'events', name='events'),
- url(string_concat('^', _('past'), '/$'), 'events_past', name='events_past'),
-)
+urlpatterns = [
+ url(r'^$', views.events, name='events'),
+ url(string_concat('^', _('past'), '/$'), views.events_past, name='events_past'),
+]
DEBUG = False
-TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
SITE_ID = 1
-# List of callables that know how to import templates from various sources.
-TEMPLATE_LOADERS = (
- 'django.template.loaders.filesystem.Loader',
- 'django.template.loaders.app_directories.Loader',
-# 'django.template.loaders.eggs.Loader',
-)
+
+TEMPLATES = [{
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'APP_DIRS': True,
+ 'OPTIONS': {
+ 'context_processors': (
+ "django.contrib.auth.context_processors.auth",
+ "django.template.context_processors.debug",
+ "django.template.context_processors.i18n",
+ "django.template.context_processors.media",
+ "django.template.context_processors.static",
+ "django.template.context_processors.tz",
+ "django.contrib.messages.context_processors.messages",
+ 'django.template.context_processors.request',
+ ),
+ },
+}]
ROOT_URLCONF = 'prawokultury.urls'
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'prawokultury.wsgi.application'
-TEMPLATE_DIRS = (
- # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
- # Always use forward slashes, even on Windows.
- # Don't forget to use absolute paths, not relative paths.
-)
'django_comments_xtd',
'pipeline',
'haystack',
- 'pagination',
+ 'fnp_django_pagination',
'sorl.thumbnail',
'piwik',
'django_cas_ng',
+++ /dev/null
-TEMPLATE_CONTEXT_PROCESSORS = (
- "django.contrib.auth.context_processors.auth",
- "django.core.context_processors.debug",
- "django.core.context_processors.i18n",
- "django.core.context_processors.media",
- "django.core.context_processors.static",
- "django.core.context_processors.tz",
- "django.contrib.messages.context_processors.messages",
- 'django.core.context_processors.request',
-)
'prawokultury.middleware.ExemptableHoneypotViewMiddleware',
'honeypot.middleware.HoneypotResponseMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
-)
-
-if 'django_cas' in INSTALLED_APPS:
- MIDDLEWARE_CLASSES += (
- 'django_cas_ng.middleware.CASMiddleware',
- )
-
-MIDDLEWARE_CLASSES += (
+ 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
+ 'django_cas_ng.middleware.CASMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
- 'pagination.middleware.PaginationMiddleware',
+ 'fnp_django_pagination.middleware.PaginationMiddleware',
'fnpdjango.middleware.SetRemoteAddrFromXRealIP',
)
GETPAID_BACKENDS = (
'getpaid.backends.payu',
)
+GETPAID_ORDER_MODEL = 'shop.Order'
PIWIK_URL = ''
PIWIK_SITE_ID = 0
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
-# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
+ 'pipeline.finders.PipelineFinder',
)
STATICFILES_STORAGE = 'fnpdjango.pipeline_storage.GzipPipelineCachedStorage'
-PIPELINE_CSS_COMPRESSOR = None
-PIPELINE_JS_COMPRESSOR = None
-PIPELINE_CSS = {
- 'base': {
- 'source_filenames': (
- 'css/base.scss',
- 'css/layout.scss',
- 'css/header.scss',
- 'css/menu.scss',
- 'css/search.scss',
- 'css/sidebar.scss',
- 'css/promobox.scss',
- 'css/entry.scss',
- 'css/footer.scss',
- 'css/prevnext.scss',
- 'css/forms.scss',
- 'events/events.scss',
- 'fnpdjango/annoy/annoy.css',
- ),
- 'output_filename': 'compressed/base.css',
- },
- 'questions': {
- 'source_filenames': (
- 'questions/tagcloud.scss',
- ),
- 'output_filename': 'compressed/questions.css'
- }
-}
-PIPELINE_JS = {
- 'base': {
- 'source_filenames': (
- 'js/promobox.js',
- 'shop/shop.js',
- 'fnpdjango/annoy/annoy.js',
- ),
- 'output_filename': 'compressed/base.js',
+
+PIPELINE = {
+ 'CSS_COMPRESSOR': None,
+ 'JS_COMPRESSOR': None,
+ 'COMPILERS': [
+ 'pipeline.compilers.sass.SASSCompiler',
+ ],
+ 'STYLESHEETS': {
+ 'base': {
+ 'source_filenames': (
+ 'css/base.scss',
+ 'css/layout.scss',
+ 'css/header.scss',
+ 'css/menu.scss',
+ 'css/search.scss',
+ 'css/sidebar.scss',
+ 'css/promobox.scss',
+ 'css/entry.scss',
+ 'css/footer.scss',
+ 'css/prevnext.scss',
+ 'css/forms.scss',
+ 'events/events.scss',
+ 'fnpdjango/annoy/annoy.css',
+ ),
+ 'output_filename': 'compressed/base.css',
+ },
+ 'questions': {
+ 'source_filenames': (
+ 'questions/tagcloud.scss',
+ ),
+ 'output_filename': 'compressed/questions.css'
+ }
},
- 'questions': {
- 'source_filenames': (
- 'questions/tagcloud.js',
- ),
- 'output_filename': 'compressed/questions.js'
+ 'JAVASCRIPT': {
+ 'base': {
+ 'source_filenames': (
+ 'js/promobox.js',
+ 'shop/shop.js',
+ 'fnpdjango/annoy/annoy.js',
+ ),
+ 'output_filename': 'compressed/base.js',
+ },
+ 'questions': {
+ 'source_filenames': (
+ 'questions/tagcloud.js',
+ ),
+ 'output_filename': 'compressed/questions.js'
+ }
}
}
-
-PIPELINE_COMPILERS = (
- 'pipeline.compilers.sass.SASSCompiler',
-)
-
-PIPELINE_STORAGE = 'pipeline.storage.PipelineFinderStorage'
<!DOCTYPE html>
-{% load url from future %}
{% load i18n %}
{% load static from staticfiles %}
{% load fnp_common menu_tags migdal_tags events_tags fnp_share fnp_lang %}
-{% load compressed %}
+{% load pipeline %}
{% load chunks %}
{% load piwik_tags %}
<html prefix="og: http://ogp.me/ns#">
<head>
<title>{% block titleextra %}{% endblock %}{% trans "Right to Culture" %}</title>
<link rel="shortcut icon" type="image/png" href="{% static "img/favicon.png" %}" />
- {% compressed_css 'base' %}
+ {% stylesheet 'base' %}
{% block extra_css %}{% endblock %}
<meta charset="UTF-8" />
<meta property='og:url' content='{% block ogurl %}{{ request.get_full_path|build_absolute_uri:request }}{% endblock %}' />
</div>
<script type="text/javascript" src="//code.jquery.com/jquery-1.8.0.min.js" charset="utf-8"></script>
- {% compressed_js 'base' %}
+ {% javascript 'base' %}
{% tracking_code %}
{% block extra_js %}{% endblock %}
</body>
{% extends "base.html" %}
{% load comments i18n %}
{% load fnp_common migdal_tags fnp_share shop_tags %}
-{% load url from future %}
{% block body %}
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from django.conf import settings
-from django.conf.urls import patterns, include, url
+from django.conf.urls import include, url
from django.contrib import admin
+import django.contrib.sitemaps.views
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.utils.translation import ugettext_lazy as _, string_concat
+import django_cas_ng.views
from fnpdjango.utils.urls import i18n_patterns
from events.urls import urlpatterns as events_urlpatterns
from migdal.urls import urlpatterns as migdal_urlpatterns
+from migdal.sitemap import sitemaps as migdal_sitemaps
+from questions.sitemap import sitemaps as question_sitemaps
admin.autodiscover()
-urlpatterns = patterns('',
- url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
- 'document_root': settings.MEDIA_ROOT,
- }),
+urlpatterns = [
url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')),
- )
-
-if 'django.contrib.sitemaps' in settings.INSTALLED_APPS:
- from migdal.sitemap import sitemaps as migdal_sitemaps
- from questions.sitemap import sitemaps as question_sitemaps
- sitemaps = dict(migdal_sitemaps.items() + question_sitemaps.items())
- urlpatterns += patterns('',
- url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {
- 'sitemaps': sitemaps
- }),
- )
-if 'django_cas_ng' in settings.INSTALLED_APPS:
- urlpatterns += patterns('',
- (r'^accounts/login/$', 'django_cas_ng.views.login'),
- (r'^accounts/logout/$', 'django_cas_ng.views.logout'),
- (r'^admin/login/$', 'django_cas_ng.views.login'),
- (r'^admin/logout/$', 'django_cas_ng.views.logout'),
- )
+ url(r'^sitemap\.xml$', django.contrib.sitemaps.views.sitemap, {
+ 'sitemaps': dict(migdal_sitemaps.items() + question_sitemaps.items())
+ }),
+
+ url(r'^accounts/login/$', django_cas_ng.views.login),
+ url(r'^accounts/logout/$', django_cas_ng.views.logout),
+ url(r'^admin/login/$', django_cas_ng.views.login),
+ url(r'^admin/logout/$', django_cas_ng.views.logout),
-urlpatterns += patterns('',
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
-)
+]
urlpatterns += i18n_patterns(
url(string_concat(r'^', _('events'), r'/'), include('events.urls')),
) + migdal_urlpatterns
if settings.DEBUG:
- urlpatterns += patterns('',
- url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
+ import django.views.static
+ urlpatterns += [
+ url(r'^media/(?P<path>.*)$', django.views.static.serve, {
'document_root': settings.MEDIA_ROOT,
}),
- )
+ ]
urlpatterns += staticfiles_urlpatterns()
{% extends "base.html" %}
-{% load url from future %}
{% block titleextra %}{{ question|linebreaksbr }} :: {% endblock %}
{% block body %}
{% extends "base.html" %}
-{% load url from future %}
{% load chunks %}
{% block titleextra %}Pierwsza pomoc w prawie autorskim: pytanie do prawnika :: {% endblock %}
{% extends "base.html" %}
-{% load url from future %}
{% load pagination_tags fnp_prevnext %}
-{% load compressed %}
+{% load pipeline %}
{% load chunks %}
{% block titleextra %}Pierwsza pomoc w prawie autorskim :: {% endblock %}
{% endblock %}
{% block extra_css %}
- {% compressed_css 'questions' %}
+ {% stylesheet 'questions' %}
{% endblock %}
{% block extra_js %}
- {% compressed_js 'questions' %}
+ {% javascript 'questions' %}
{% endblock %}
{% extends "base.html" %}
-{% load url from future %}
{% block titleextra %}Dziękujemy za przesłanie pytania :: {% endblock %}
{% block body %}
<p>Wróć do <a href="{% url 'migdal_main' %}">strony głównej</a>.</p>
</div>
-{% endblock %}
\ No newline at end of file
+{% endblock %}
# This file is part of PrawoKultury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
-from django.conf.urls import patterns, url
+from django.conf.urls import url
from django.views.generic import DetailView, TemplateView
from .models import Question
from .views import QuestionFormView, QuestionListView
-urlpatterns = patterns('',
+urlpatterns = [
url(r'^$',
QuestionListView.as_view(),
name="questions"
),
name="questions_thanks"
),
-)
+]
-i https://py.mdrn.pl/simple
-Django>=1.7,<1.8
+Django>=1.8,<1.9
Pillow
sorl-thumbnail==12.4.1
-django-pagination
+fnp-django-pagination==2.2.4
django-honeypot==0.4.0
django-cas-ng==3.5.10
django-gravatar2
django-contrib-comments==1.6.0
django-comments-xtd==1.5.1
-django-pipeline>=1.3.23,<1.4
+django-pipeline==1.6.14
#pyScss
#git+git://github.com/Kronuz/pyScss.git@d8f4da23a3c87696a75b3830ed4ab49b75550a93#egg=pyScss
pysolr
django-piwik
-django-taggit>=0.12,<0.13
-django-taggit-autosuggest>=0.2.1,<0.3
+django-taggit==0.22.2
+django-taggit-autosuggest>=0.3.8
-django-getpaid>=1.6,<1.7
+django-getpaid==1.7.6
django-celery>=3.1,<3.2
celery<4.0
{% extends "shop/email/base.txt" %}
{% load i18n %}
-{% load url from future %}
{% block body %}
{% load i18n staticfiles %}
-{% load url from future %}
<form class="submit-form" action="{% url 'shop_buy' form.offer.entry.slug %}" method="post">
<table>
# This file is part of PrawoKultury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
-from django.conf.urls import patterns, url, include
+from django.conf.urls import url, include
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.csrf import csrf_exempt
from getpaid.backends.payu.views import OnlineView
from .views import ThanksView, NoThanksView, OfferDetailView
-urlpatterns = patterns('',
+urlpatterns = [
url(r'^kup/(?P<slug>[^/]+)/$', OfferDetailView.as_view(), name='shop_buy'),
url(r'^dziekujemy/(?P<pk>\d+)/$', ThanksView.as_view(), name='shop_thanks'),
url(r'^niepowodzenie/(?P<pk>\d+)/$', NoThanksView.as_view(), name='shop_nothanks'),
honeypot_exempt(csrf_exempt(OnlineView.as_view())),
name='getpaid-payu-online'),
url(r'^getpaid/', include('getpaid.urls')),
-)
+]
ctx['entry'] = self.object.entry
return ctx
- def get_form(self, form_class):
+ def get_form(self, form_class=OrderForm):
return form_class(self.object, self.request.POST)
def form_valid(self, form):