fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
53e8068
)
Fixes
author
Radek Czajka
<rczajka@rczajka.pl>
Mon, 13 Jan 2020 10:00:42 +0000
(10:00 +0000)
committer
Radek Czajka
<rczajka@rczajka.pl>
Mon, 13 Jan 2020 10:00:42 +0000
(10:00 +0000)
src/catalogue/urls.py
patch
|
blob
|
history
src/club/management/commands/prolong.py
patch
|
blob
|
history
src/club/payu/models.py
patch
|
blob
|
history
src/club/templates/club/email/thanks.txt
patch
|
blob
|
history
diff --git
a/src/catalogue/urls.py
b/src/catalogue/urls.py
index
27fddc2
..
230e1c9
100644
(file)
--- a/
src/catalogue/urls.py
+++ b/
src/catalogue/urls.py
@@
-37,7
+37,7
@@
urlpatterns = [
path('audiobooki/', views.audiobooks, name='audiobook_list'),
path('daisy/', views.daisy_list, name='daisy_list'),
path('nowe/', ListView.as_view(
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'),
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'),
diff --git
a/src/club/management/commands/prolong.py
b/src/club/management/commands/prolong.py
index
34ebe63
..
2705990
100644
(file)
--- a/
src/club/management/commands/prolong.py
+++ b/
src/club/management/commands/prolong.py
@@
-2,6
+2,7
@@
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from datetime import timedelta
# 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
from django.core.management.base import BaseCommand, CommandError
from django.utils.timezone import now
from club.models import Schedule
@@
-11,5
+12,9
@@
class Command(BaseCommand):
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)
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()
+
diff --git
a/src/club/payu/models.py
b/src/club/payu/models.py
index
1a49dd7
..
f7c3535
100644
(file)
--- a/
src/club/payu/models.py
+++ b/
src/club/payu/models.py
@@
-124,6
+124,8
@@
class Order(models.Model):
token.save()
# else?
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()
self.order_id = response['orderId']
self.save()
diff --git
a/src/club/templates/club/email/thanks.txt
b/src/club/templates/club/email/thanks.txt
index
86e1e54
..
ffd83d0
100644
(file)
--- a/
src/club/templates/club/email/thanks.txt
+++ b/
src/club/templates/club/email/thanks.txt
@@
-1,6
+1,6
@@
{% load chunks %}{% chunk "club_email_thanks" %}
{% 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" %}
{% if schedule.membership %}
{% chunk "club_email_thanks_registered" %}