Permalink
Browse files

Merge pull request #71 from annttu/master

Fixed unpaid paper reminders queryset to be evaluated every time.
  • Loading branch information...
2 parents 43ea3d7 + d2bad95 commit 1638a7ca49afbd083d908b3cba345943118b328a @annttu annttu committed Oct 15, 2013
Showing with 23 additions and 10 deletions.
  1. +2 −9 membership/urls.py
  2. +20 −0 membership/views.py
  3. +1 −1 sikteeri/version.py
View
@@ -103,15 +103,8 @@
'template_object_name': 'member',
'mimetype': 'text/plain'},
name='approved_memberships_emails'),
- url(r'memberships/unpaid_paper_reminded/$', 'membership.views.member_object_list',
- {'queryset': Membership.paper_reminder_sent_unpaid_after(),
- 'template_name': 'membership/membership_list.html',
- 'template_object_name': 'member',
- 'paginate_by': ENTRIES_PER_PAGE}, name='unpaid_paper_reminded_memberships'),
- url(r'memberships/unpaid_paper_reminded-plain/$', 'membership.views.member_object_list',
- {'queryset': Membership.paper_reminder_sent_unpaid_after().order_by('id'),
- 'template_name': 'membership/membership_list_plaintext.html',
- 'template_object_name': 'member'},
+ url(r'memberships/unpaid_paper_reminded/$', 'membership.views.unpaid_paper_reminded', name='unpaid_paper_reminded_memberships'),
+ url(r'memberships/unpaid_paper_reminded-plain/$', 'membership.views.unpaid_paper_reminded_plain',
name='unpaid_paper_reminded_memberships_plain'),
url(r'memberships/deleted/$', 'membership.views.member_object_list',
{'queryset': Membership.objects.filter(status__exact='D').order_by('-id'),
View
@@ -811,6 +811,26 @@ def membership_duplicates(request, id):
return member_object_list(request, **view_params)
+@permission_required('membership.read_members')
+def unpaid_paper_reminded(request):
+ view_params = {'queryset': Membership.paper_reminder_sent_unpaid_after(),
+ 'template_name': 'membership/membership_list.html',
+ 'template_object_name': 'member',
+ 'paginate_by': ENTRIES_PER_PAGE
+ }
+
+ return member_object_list(request, **view_params)
+
+@permission_required('membership.read_members')
+def unpaid_paper_reminded_plain(request):
+ view_params = {'queryset': Membership.paper_reminder_sent_unpaid_after().order_by('id'),
+ 'template_name': 'membership/membership_list_plaintext.html',
+ 'template_object_name': 'member'
+ }
+
+ return member_object_list(request, **view_params)
+
+
@permission_required('membership.delete_members')
@transaction.commit_on_success
def membership_delete(request, id, template_name='membership/membership_delete.html'):
View
@@ -1,4 +1,4 @@
#!/usr/bin/env python
# encoding: utf-8
-VERSION = '''1.2.5'''
+VERSION = '''1.2.6'''

0 comments on commit 1638a7c

Please sign in to comment.