From: Radek Czajka Date: Mon, 17 Jun 2019 13:24:51 +0000 (+0200) Subject: Club prepared. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/65c9feda79d2b2c94cb7dcd561318a83fd796f0a Club prepared. --- diff --git a/src/catalogue/api/views.py b/src/catalogue/api/views.py index 5a064c1c5..ee9f07403 100644 --- a/src/catalogue/api/views.py +++ b/src/catalogue/api/views.py @@ -3,6 +3,8 @@ # import json from django.http import Http404, HttpResponse +from django.utils.decorators import method_decorator +from django.views.decorators.cache import never_cache from rest_framework.generics import ListAPIView, RetrieveAPIView, get_object_or_404 from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly from rest_framework.response import Response @@ -227,6 +229,7 @@ class EpubView(RetrieveAPIView): lookup_field = 'slug' permission_classes = [IsClubMember] + @method_decorator(never_cache) def get(self, *args, **kwargs): return HttpResponse(self.get_object().get_media('epub')) diff --git a/src/catalogue/templates/catalogue/book_short.html b/src/catalogue/templates/catalogue/book_short.html index 4f186e8ff..ccb100446 100644 --- a/src/catalogue/templates/catalogue/book_short.html +++ b/src/catalogue/templates/catalogue/book_short.html @@ -145,7 +145,9 @@ {% else %} -

{% trans "For now this work is only available for our subscribers." %}

+

{% trans "For now this work is only available for our subscribers." %} + Dołącz do Towarzystwa Przyjaciół Wolnych Lektur +

{% endif %} {% endcache %} {% block book-box-extra-info %}{% endblock %} @@ -154,11 +156,11 @@ {% endwith %} {% block right-column %} - {% if audiobooks %} + {% if audiobooks %}{% if book|status:request.user != 'closed' %}
{% include 'catalogue/snippets/jplayer.html' %}
- {% endif %} + {% endif %}{% endif %} {% endblock %} {% if book.abstract %}
diff --git a/src/catalogue/templates/catalogue/snippets/jplayer.html b/src/catalogue/templates/catalogue/snippets/jplayer.html index e3c88c14c..46eef4066 100644 --- a/src/catalogue/templates/catalogue/snippets/jplayer.html +++ b/src/catalogue/templates/catalogue/snippets/jplayer.html @@ -1,5 +1,5 @@ -{% load i18n %} -{% if audiobooks %} +{% load i18n catalogue_tags %} +{% if audiobooks %}{% if book|status:request.user != 'closed' %}
-{% endif %} +{% endif %}{% endif %} diff --git a/src/catalogue/views.py b/src/catalogue/views.py index 2ea5eb019..6299cd19d 100644 --- a/src/catalogue/views.py +++ b/src/catalogue/views.py @@ -15,6 +15,7 @@ from django.contrib.auth.decorators import login_required, user_passes_test from django.utils.http import urlquote_plus from django.utils import translation from django.utils.translation import ugettext as _, ugettext_lazy +from django.views.decorators.cache import never_cache from ajaxable.utils import AjaxableFormView from club.models import Membership @@ -354,6 +355,7 @@ def tag_info(request, tag_id): return HttpResponse(tag.description) +@never_cache def embargo_link(request, format_, slug): book = get_object_or_404(Book, slug=slug) if format_ not in Book.formats: diff --git a/src/club/locale/pl/LC_MESSAGES/django.mo b/src/club/locale/pl/LC_MESSAGES/django.mo index 576eae04a..921c37a12 100644 Binary files a/src/club/locale/pl/LC_MESSAGES/django.mo and b/src/club/locale/pl/LC_MESSAGES/django.mo differ diff --git a/src/club/locale/pl/LC_MESSAGES/django.po b/src/club/locale/pl/LC_MESSAGES/django.po index 0cb3e2495..a631b73f5 100644 --- a/src/club/locale/pl/LC_MESSAGES/django.po +++ b/src/club/locale/pl/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-03-04 11:36+0100\n" -"PO-Revision-Date: 2019-03-04 11:34+0100\n" +"PO-Revision-Date: 2019-06-17 15:08+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: pl\n" @@ -26,11 +26,11 @@ msgstr "miesięcznie" #: models.py:26 msgid "a year" -msgstr "rocznie" +msgstr "raz do roku" #: models.py:27 msgid "in perpetuity" -msgstr "na zawsze" +msgstr "raz na zawsze" #: models.py:30 msgid "inteval" diff --git a/src/club/migrations/0010_auto_20190529_0946.py b/src/club/migrations/0010_auto_20190529_0946.py new file mode 100644 index 000000000..77f13dea4 --- /dev/null +++ b/src/club/migrations/0010_auto_20190529_0946.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-05-29 07:46 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('club', '0009_auto_20190510_1510'), + ] + + operations = [ + migrations.AddField( + model_name='schedule', + name='email_sent', + field=models.BooleanField(default=False), + ), + migrations.AlterField( + model_name='schedule', + name='method', + field=models.CharField(choices=[('payu', 'PayU'), ('payu-re', 'PayU (płatność odnawialna)')], max_length=255, verbose_name='method'), + ), + ] diff --git a/src/club/models.py b/src/club/models.py index d7be28732..1f47d587b 100644 --- a/src/club/models.py +++ b/src/club/models.py @@ -1,8 +1,10 @@ from datetime import datetime, timedelta from django.conf import settings from django.contrib.sites.models import Site +from django.core.mail import send_mail from django.urls import reverse from django.db import models +from django import template from django.utils.timezone import now from django.utils.translation import ugettext_lazy as _, ungettext, ugettext, get_language from catalogue.utils import get_random_hash @@ -67,6 +69,7 @@ class Schedule(models.Model): is_cancelled = models.BooleanField(_('cancelled'), default=False) started_at = models.DateTimeField(_('started at'), auto_now_add=True) expires_at = models.DateTimeField(_('expires_at'), null=True, blank=True) + email_sent = models.BooleanField(default=False) class Meta: verbose_name = _('schedule') @@ -89,6 +92,9 @@ class Schedule(models.Model): def get_absolute_url(self): return reverse('club_schedule', args=[self.key]) + def get_thanks_url(self): + return reverse('club_thanks', args=[self.key]) + def get_payment_method(self): return method_by_slug[self.method] @@ -98,6 +104,15 @@ class Schedule(models.Model): def is_active(self): return self.expires_at is not None and self.expires_at > now() + def send_email(self): + ctx = {'schedule': self} + send_mail( + template.loader.render_to_string('club/email/thanks_subject.txt', ctx).strip(), + template.loader.render_to_string('club/email/thanks.txt', ctx), + settings.CONTACT_EMAIL, [self.email], fail_silently=False) + self.email_sent = True + self.save() + class Membership(models.Model): """ Represents a user being recognized as a member of the club. """ @@ -167,7 +182,7 @@ class PayUOrder(payu_models.Order): def get_continue_url(self): return "https://{}{}".format( Site.objects.get_current().domain, - self.schedule.get_absolute_url()) + self.schedule.get_thanks_url()) def get_description(self): return ugettext('Towarzystwo Wolnych Lektur') @@ -191,6 +206,9 @@ class PayUOrder(payu_models.Order): self.schedule.expires_at = new_exp self.schedule.save() + if not self.schedule.email_sent: + self.schedule.send_email() + class PayUCardToken(payu_models.CardToken): schedule = models.ForeignKey(Schedule, on_delete=models.CASCADE) diff --git a/src/club/payment_methods.py b/src/club/payment_methods.py index b215b1d69..ca34ace48 100644 --- a/src/club/payment_methods.py +++ b/src/club/payment_methods.py @@ -32,7 +32,7 @@ class PayU(PaymentMethod): class PayURe(PaymentMethod): slug='payu-re' - name = 'PayU Recurring' + name = 'PayU (płatność odnawialna)' template_name = 'club/payment/payu-re.html' is_recurring = True @@ -55,7 +55,7 @@ class PayURe(PaymentMethod): class PayPal(PaymentMethod): slug='paypal' - name = 'PayPal' + name = 'PayPal (płatność odnawialna)' template_name = 'club/payment/paypal.html' is_recurring = True is_onetime = True @@ -66,13 +66,6 @@ class PayPal(PaymentMethod): methods = [] -pos = getattr(settings, 'CLUB_PAYU_POS', None) -if pos: - payu_method = PayU(pos) - methods.append(payu_method) -else: - payu_method = None - pos= getattr(settings, 'CLUB_PAYU_RECURRING_POS', None) if pos: payure_method = PayURe(pos) @@ -80,8 +73,15 @@ if pos: else: payure_method = None +pos = getattr(settings, 'CLUB_PAYU_POS', None) +if pos: + payu_method = PayU(pos) + methods.append(payu_method) +else: + payu_method = None + -methods.append(PayPal()) +#methods.append(PayPal()) method_by_slug = { diff --git a/src/club/payu/models.py b/src/club/payu/models.py index 4ab2c0aa2..4fe4d94a5 100644 --- a/src/club/payu/models.py +++ b/src/club/payu/models.py @@ -120,7 +120,7 @@ class Order(models.Model): self.save() - return response.get('redirectUri', self.schedule.get_absolute_url()) + return response.get('redirectUri', self.schedule.get_thanks_url()) class Notification(models.Model): diff --git a/src/club/static/club/mastercard.png b/src/club/static/club/mastercard.png new file mode 100644 index 000000000..f1400cf4a Binary files /dev/null and b/src/club/static/club/mastercard.png differ diff --git a/src/club/static/club/visa-100.png b/src/club/static/club/visa-100.png new file mode 100644 index 000000000..477ecf3a9 Binary files /dev/null and b/src/club/static/club/visa-100.png differ diff --git a/src/club/static/club/visa.png b/src/club/static/club/visa.png new file mode 100644 index 000000000..5666e7bf8 Binary files /dev/null and b/src/club/static/club/visa.png differ diff --git a/src/club/templates/club/email/thanks.txt b/src/club/templates/club/email/thanks.txt new file mode 100644 index 000000000..86e1e54c1 --- /dev/null +++ b/src/club/templates/club/email/thanks.txt @@ -0,0 +1,13 @@ +{% load chunks %}{% chunk "club_email_thanks" %} + +Od {{ schedule.started_at.date }} wspierasz nas kwotą {{ schedule.amount }} zł {{ schedule.plan.get_interval_display }}. + +{% if schedule.membership %} +{% chunk "club_email_thanks_registered" %} +{% else %} +{% chunk "club_email_thanks_unregistered" %} + +https://wolnelektury.pl{{ schedule.get_absolute_url }} +{% endif %} + +{% chunk "club_email_thanks_bottom" %} diff --git a/src/club/templates/club/email/thanks_subject.txt b/src/club/templates/club/email/thanks_subject.txt new file mode 100644 index 000000000..00189a0a9 --- /dev/null +++ b/src/club/templates/club/email/thanks_subject.txt @@ -0,0 +1 @@ +{% load chunks %}{% chunk "club_email_thanks_subject" %} diff --git a/src/club/templates/club/index.html b/src/club/templates/club/index.html index fd36aad4e..ba5977be4 100644 --- a/src/club/templates/club/index.html +++ b/src/club/templates/club/index.html @@ -1,22 +1,26 @@ {% extends "base/base.html" %} {% load active_schedule from club %} +{% load chunks %} -{% block titleextra %}Towarzystwo Wolnych Lektur{% endblock %} +{% block titleextra %}Towarzystwo Przyjaciół Wolnych Lektur{% endblock %} {% block body %}
-

Towarzystwo Wolnych Lektur

+

Towarzystwo Przyjaciół Wolnych Lektur

Towarzystwo jest fajne.

+ {% chunk 'club' %} + +

{% with schedule=request.user|active_schedule %} {% if schedule %} -

Jesteś już w Towarzystwie!

+Gratulacje – należysz już do Towarzystwa Przyjaciół Wolnych Lektur!

{% else %} -Dołącz do Towarzystwa. +Dołącz do Towarzystwa

{% endif %} {% endwith %} diff --git a/src/club/templates/club/membership_form.html b/src/club/templates/club/membership_form.html index 3a9a00620..ecba87760 100644 --- a/src/club/templates/club/membership_form.html +++ b/src/club/templates/club/membership_form.html @@ -1,4 +1,5 @@ {% extends request.session.from_app|yesno:"base/app.html,base/base.html" %} +{% load chunks %} {% block titleextra %}Towarzystwo Wolnych Lektur{% endblock %} @@ -17,13 +18,15 @@
-

{% if membership %}Odnów swoje członkostwo w Towarzystwie Wolnych Lektur{% else %}Dołącz do Towarzystwa Wolnych Lektur{% endif %}

+

{% if membership %}Odnów swoje członkostwo w Towarzystwie Przyjaciół Wolnych Lektur{% else %}Dołącz do Towarzystwa Przyjaciół Wolnych Lektur{% endif %}

+ +{% chunk 'club_form_top' %}
{% csrf_token %} -

Składka

- +

Zadeklaruj, jak często i jaką kwotą chcesz nas wspierać:

+
    {% for e in form.non_field_errors %}
  • {{ e }}
  • @@ -56,7 +59,7 @@ {% endfor %} -

    Metoda płatności

    +

    Wybierz metodę płatności:

      {% for e in form.method.errors %} @@ -67,18 +70,23 @@ {% for payment_method in form.payment_methods %}
      -
      {% endfor %} -

      - {{ form.email.label }}: +

      + Podaj nam swój adres e-mail, żebyśmy mogli się z Tobą skontaktować: +

      + +

      {{ form.email }}

      +{% chunk 'club_form_bottom' %} +
{% endblock %} diff --git a/src/club/templates/club/payment/payu-re.html b/src/club/templates/club/payment/payu-re.html index 712b27c2e..a1bc573eb 100644 --- a/src/club/templates/club/payment/payu-re.html +++ b/src/club/templates/club/payment/payu-re.html @@ -1,5 +1,5 @@ {% load staticfiles %} - -karta -⟳ płatność cykliczna - + + + ++
Płatność cykliczna, odnawiana automatycznie. diff --git a/src/club/templates/club/payment/payu.html b/src/club/templates/club/payment/payu.html index 7979115a4..60e6b6daf 100644 --- a/src/club/templates/club/payment/payu.html +++ b/src/club/templates/club/payment/payu.html @@ -1,5 +1,7 @@ {% load staticfiles %} - - -karta + + + + przelew +
Płatność jednorazowa diff --git a/src/club/templates/club/schedule.html b/src/club/templates/club/schedule.html index b1e190780..de0797f5b 100644 --- a/src/club/templates/club/schedule.html +++ b/src/club/templates/club/schedule.html @@ -7,37 +7,44 @@ {% block body %}
-

Plan płatności

- -
E-mail: {{ schedule.email }}
-
Składka: {{ schedule.amount }} zł {{ schedule.plan.get_interval_display }}
-
Wybrana metoda płatności: {{ schedule.get_payment_method.name }}
+

+Cieszymy się, że jesteś z nami! Dziękujemy za wsparcie! +

+

+Od {{ schedule.started_at.date }} +{% if schedule.expires_at %} + do {{ schedule.expires_at.date }} +{% endif %} +wspierasz nas kwotą {{ schedule.amount }} zł {{ schedule.plan.get_interval_display }}. +

{% if schedule.is_active %} - {% if schedule.plan.is_perpetual %} - Opłacona na zawsze. - {% endif %} - Aktualnie opłacona do: {{ schedule.expires_at }} - {% if schedule.get_payment_method.is_recurring %} -
+ {% if schedule.is_cancelled %} +

Płatność anulowana.

+

+ Odnów składkę +

+ {% else %} + {% csrf_token %} - -
+ + + {% endif %} {% else %} -
+ {% csrf_token %} - -
+ + {% endif %} {% else %} {% if schedule.is_expired %} Członkostwo wygasło. -
+ {% csrf_token %} - +
@@ -49,33 +56,41 @@
{% csrf_token %} - +
{% endif %} {% endif %} {% endif %} -
+ +
+

Towarzystwo Przyjaciół Wolnych Lektur

+ {% if schedule.membership %}

- Członek/członkini Towarzystwa nr {{ schedule.membership.id }} ({{ schedule.membership.user }}). -

+ Należysz już do Towarzystwa Przyjaciół Wolnych Lektur!

-
+ {% csrf_token %} - Imię i nazwisko na legitymację:
+ Skontaktujemy się z Tobą w sprawie odbioru legitymacji członkowskiej.
Tutaj możesz podać imię i nazwisko, jakie ma na niej widnieć:

- +
{% else %} + +

+Twoje wsparcie upoważnia Cię do członkostwa w Towarzystwie Przyjaciół Wolnych Lektur. +Aby w pełni z niego korzystać, zapisz się do Towarzystwa swoim kontem użytkownika na Wolnych Lekturach. +

+ +

-Płatność nie przypisana do członkostwa.
-Przypisz +Zapisz się

{% endif %} diff --git a/src/club/templates/club/thanks.html b/src/club/templates/club/thanks.html new file mode 100644 index 000000000..c83b70269 --- /dev/null +++ b/src/club/templates/club/thanks.html @@ -0,0 +1,25 @@ +{% extends request.session.from_app|yesno:"base/app.html,base/base.html" %} +{% load chunks %} + + +{% block titleextra %}Towarzystwo Wolnych Lektur{% endblock %} + + +{% block body %} + + +
+ +

Dziękujemy

+ + +{% chunk 'club_thanks' %} + +{% if request.session.from_app %} + Wróć do aplikacji +{% else %} +{% endif %} + +
+ +{% endblock %} diff --git a/src/club/urls.py b/src/club/urls.py index 506f42b62..844359b9c 100644 --- a/src/club/urls.py +++ b/src/club/urls.py @@ -3,10 +3,12 @@ from . import views urlpatterns = [ - url(r'^$', views.ClubView.as_view()), - url(r'^dolacz/$', views.JoinView.as_view(), name='club_join'), + url(r'^$', views.JoinView.as_view(), name='club_join'), + url(r'^info/$', views.ClubView.as_view(), name='club'), url(r'^plan/(?P[-a-z0-9]+)/$', views.ScheduleView.as_view(), name='club_schedule'), + url(r'^plan/(?P[-a-z0-9]+)/dziekujemy/$', views.ScheduleThanksView.as_view(), name='club_thanks'), + url(r'^przylacz/(?P[-a-z0-9]+)/$', views.claim, name='club_claim'), url(r'^anuluj/(?P[-a-z0-9]+)/$', views.cancel, name='club_cancel'), url(r'^testowa-platnosc/(?P[-a-z0-9]+)/$', views.DummyPaymentView.as_view(), name='club_dummy_payment'), diff --git a/src/club/views.py b/src/club/views.py index 93afaddb9..e80acaa94 100644 --- a/src/club/views.py +++ b/src/club/views.py @@ -1,6 +1,9 @@ +from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404, render +from django.utils.decorators import method_decorator +from django.views.decorators.cache import never_cache from django.views.generic import FormView, CreateView, TemplateView, DetailView, UpdateView from django.views import View from .payu import POSS @@ -14,6 +17,11 @@ from .payment_methods import payure_method class ClubView(TemplateView): template_name = 'club/index.html' + def get_context_data(self, *args, **kwargs): + ctx = super().get_context_data(*args, **kwargs) + ctx['active_menu_item'] = 'club' + return ctx + class JoinView(CreateView): form_class = ScheduleForm @@ -23,6 +31,10 @@ class JoinView(CreateView): return self.request.GET.get('app') def get(self, request): + # TODO: configure as app-allowed hosts. + if settings.CLUB_APP_HOST and self.is_app() and request.META['HTTP_HOST'] != settings.CLUB_APP_HOST: + return HttpResponseRedirect("https://" + settings.CLUB_APP_HOST + request.get_full_path()) + if self.is_app(): request.session['from_app'] = True elif request.session and 'from_app' in request.session: @@ -41,8 +53,7 @@ class JoinView(CreateView): def get_context_data(self, **kwargs): c = super(JoinView, self).get_context_data(**kwargs) c['membership'] = getattr(self.request.user, 'membership', None) - #if hasattr(form, 'errors'): - # print(form.errors) + c['active_menu_item'] = 'club' return c def get_initial(self): @@ -62,11 +73,17 @@ class JoinView(CreateView): return self.object.initiate_payment(self.request) +@method_decorator(never_cache, name='dispatch') class ScheduleView(DetailView): model = models.Schedule slug_field = slug_url_kwarg = 'key' template_name = 'club/schedule.html' + def get_context_data(self, *args, **kwargs): + ctx = super().get_context_data(*args, **kwargs) + ctx['active_menu_item'] = 'club' + return ctx + def post(self, request, key): schedule = self.get_object() return HttpResponseRedirect(schedule.initiate_payment(request)) @@ -132,3 +149,15 @@ class MembershipView(UpdateView): def get_object(self): return self.request.user.membership + + +class ScheduleThanksView(DetailView): + model = models.Schedule + slug_field = slug_url_kwarg = 'key' + template_name = 'club/thanks.html' + + def get_context_data(self, *args, **kwargs): + ctx = super().get_context_data(*args, **kwargs) + ctx['active_menu_item'] = 'club' + return ctx + diff --git a/src/wolnelektury/settings/custom.py b/src/wolnelektury/settings/custom.py index ab4719e5a..fbb7ba2fd 100644 --- a/src/wolnelektury/settings/custom.py +++ b/src/wolnelektury/settings/custom.py @@ -41,4 +41,4 @@ PAYU_POS = { CLUB_PAYU_POS = '300746' CLUB_PAYU_RECURRING_POS = '300746' - +CLUB_APP_HOST = None diff --git a/src/wolnelektury/static/scss/main/form.scss b/src/wolnelektury/static/scss/main/form.scss index ef15365e3..ba7616d91 100755 --- a/src/wolnelektury/static/scss/main/form.scss +++ b/src/wolnelektury/static/scss/main/form.scss @@ -61,6 +61,8 @@ form table { .wlform { .payment-method { + margin-top: 2em; + input { height: 50px; vertical-align: middle; @@ -69,24 +71,24 @@ form table { img { vertical-align: middle; margin-right: 1em; + height: 36px; } label { + display: inline; margin: .5em 0; vertical-align: middle; } - .method { - // border: 1px solid black; - border-radius: 10px; - line-height: 48px; + border: 1px solid black; + border-radius: 5px; + line-height: 34px; display: inline-block; vertical-align: middle; padding: 0 1em; margin-right: 1em; - font-size: 1.25em; - background: #01818980; - color: white; + color: black; + text-transform: uppercase; } } } diff --git a/src/wolnelektury/templates/base/app.html b/src/wolnelektury/templates/base/app.html index b89377359..e0a729b71 100644 --- a/src/wolnelektury/templates/base/app.html +++ b/src/wolnelektury/templates/base/app.html @@ -37,7 +37,7 @@
- diff --git a/src/wolnelektury/templates/base/superbase.html b/src/wolnelektury/templates/base/superbase.html index 12a6565ea..a34006b73 100644 --- a/src/wolnelektury/templates/base/superbase.html +++ b/src/wolnelektury/templates/base/superbase.html @@ -118,8 +118,8 @@ {% trans "Audiobooks" %} - - {% trans "Gallery" %} + + {% trans "Wesprzyj nas" %} {% trans "All works" %} diff --git a/src/wolnelektury/templates/user.html b/src/wolnelektury/templates/user.html index f7491badd..0f261f92b 100644 --- a/src/wolnelektury/templates/user.html +++ b/src/wolnelektury/templates/user.html @@ -11,5 +11,8 @@

{% trans "Password" %}

{% trans "E-mail" %}

{% trans "Social accounts" %}

+ {% if request.user.membership %} +

Należysz do Towarzystwa Przyjaciół Wolnych Lektur

+ {% endif %}
{% endblock %} diff --git a/src/wolnelektury/urls.py b/src/wolnelektury/urls.py index 8b02fda40..0ebc4891d 100644 --- a/src/wolnelektury/urls.py +++ b/src/wolnelektury/urls.py @@ -52,7 +52,10 @@ urlpatterns += [ url(r'^isbn/', include('isbn.urls')), url(r'^paypal/app-form/$', RedirectView.as_view( - url='/towarzystwo/dolacz/?app=1', permanent=True)), + url='/towarzystwo/?app=1', permanent=False)), + url(r'^towarzystwo/dolacz/$', RedirectView.as_view( + url='/towarzystwo/', permanent=False)), + url(r'^paypal/', include('paypal.urls')), url(r'^powiadomienie/', include('push.urls')),