syntax
This commit is contained in:
parent
ab22a6de4a
commit
3cde4af189
|
@ -41,7 +41,7 @@ class ShopTicketDownloadView(LoginRequiredMixin, SingleObjectMixin, View):
|
|||
def get(self, request, *args, **kwargs):
|
||||
response = HttpResponse(content_type='application/pdf')
|
||||
response['Content-Disposition'] = 'attachment; filename="{type}_ticket_{pk}.pdf"'.format(
|
||||
type=self.get_object().shortname
|
||||
type=self.get_object().shortname,
|
||||
pk=self.get_object().pk
|
||||
)
|
||||
response.write(self.get_object().generate_pdf().getvalue())
|
||||
|
|
Loading…
Reference in a new issue