begin doc in views

This commit is contained in:
Nico Schottelius 2020-08-01 14:05:56 +02:00
parent 05a897db70
commit 932ac06cea
1 changed files with 3 additions and 0 deletions

View File

@ -197,6 +197,9 @@ class BillViewSet(viewsets.ReadOnlyModelViewSet):
@action(detail=True, methods=['get'])
def download(self, *args, **kwargs):
"""
Allow to download
"""
bill = self.get_object()
output_file = NamedTemporaryFile()
bill_html = render_to_string("bill.html.j2", {'bill': bill})