comparison donations/views.py @ 1079:75189bd9c4ba

Convert donations pages to V3 design.
author Brian Neal <bgneal@gmail.com>
date Sat, 23 Apr 2016 00:01:40 -0500
parents e1c03da72818
children 7fb9bc5a1232
comparison
equal deleted inserted replaced
1078:6bf83070b19f 1079:75189bd9c4ba
10 from django.conf import settings 10 from django.conf import settings
11 from django.contrib.sites.models import Site 11 from django.contrib.sites.models import Site
12 from django.http import HttpResponse 12 from django.http import HttpResponse
13 from django.contrib.auth.models import User 13 from django.contrib.auth.models import User
14 from django.views.decorators.csrf import csrf_exempt 14 from django.views.decorators.csrf import csrf_exempt
15 from django.views.generic import TemplateView
15 16
16 17
17 from donations.models import Donation 18 from donations.models import Donation
18 19
19 PP_DATE_FMT = '%H:%M:%S %b %d, %Y' 20 PP_DATE_FMT = '%H:%M:%S %b %d, %Y'
70 'anonymous': settings.DONATIONS_ANON_NAME, 71 'anonymous': settings.DONATIONS_ANON_NAME,
71 'item_name': settings.DONATIONS_ITEM_NAME, 72 'item_name': settings.DONATIONS_ITEM_NAME,
72 'item_number': settings.DONATIONS_ITEM_NUM, 73 'item_number': settings.DONATIONS_ITEM_NUM,
73 'item_anon_number': settings.DONATIONS_ITEM_ANON_NUM, 74 'item_anon_number': settings.DONATIONS_ITEM_ANON_NUM,
74 'domain': current_site.domain, 75 'domain': current_site.domain,
76 'V3_DESIGN': True,
75 }) 77 })
78
79
80 class ThanksView(TemplateView):
81 template_name = 'donations/thanks.html'
82
83 def get_context_data(self, **kwargs):
84 context = super(ThanksView, self).get_context_data(**kwargs)
85 context['V3_DESIGN'] = True
86 return context
76 87
77 88
78 @csrf_exempt 89 @csrf_exempt
79 def ipn(request): 90 def ipn(request):
80 """ 91 """