begin doc in views

This commit is contained in:
Nico Schottelius 2020-08-01 14:05:56 +02:00
parent 05a897db70
commit 932ac06cea

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})