path('audiobooki/', views.audiobooks, name='audiobook_list'),
path('daisy/', views.daisy_list, name='daisy_list'),
path('nowe/', ListView.as_view(
- queryset=Book.objects.filter(parent=None).order_by('-created_at'),
+ queryset=Book.objects.filter(parent=None, findable=True).order_by('-created_at'),
template_name='catalogue/recent_list.html'), name='recent_list'),
path('nowe/audiobooki/', ListView.as_view(
queryset=Book.objects.filter(media__type='ogg').annotate(m=Max('media__uploaded_at')).order_by('-m'),
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from datetime import timedelta
+import traceback
from django.core.management.base import BaseCommand, CommandError
from django.utils.timezone import now
from club.models import Schedule
def handle(self, *args, **options):
for s in Schedule.objects.exclude(monthly=False, yearly=False).filter(is_cancelled=False, expires_at__lt=now() + timedelta(1)):
print(s, s.email, s.expires_at)
- s.pay(None)
+ try:
+ s.pay(None)
+ except:
+ traceback.print_exc()
+
token.save()
# else?
+ if 'orderId' not in response:
+ raise ValueError("Expecting dict with `orderId` key, got: %s" % response)
self.order_id = response['orderId']
self.save()
{% load chunks %}{% chunk "club_email_thanks" %}
-Od {{ schedule.started_at.date }} wspierasz nas kwotą {{ schedule.amount }} zł {{ schedule.plan.get_interval_display }}.
+W dniu {{ schedule.started_at.date }} wsparłeś/-aś nas kwotą {{ schedule.amount }} zł.
{% if schedule.membership %}
{% chunk "club_email_thanks_registered" %}