forked from uncloud/uncloud
begin doc in views
This commit is contained in:
parent
05a897db70
commit
932ac06cea
1 changed files with 3 additions and 0 deletions
|
@ -197,6 +197,9 @@ class BillViewSet(viewsets.ReadOnlyModelViewSet):
|
||||||
|
|
||||||
@action(detail=True, methods=['get'])
|
@action(detail=True, methods=['get'])
|
||||||
def download(self, *args, **kwargs):
|
def download(self, *args, **kwargs):
|
||||||
|
"""
|
||||||
|
Allow to download
|
||||||
|
"""
|
||||||
bill = self.get_object()
|
bill = self.get_object()
|
||||||
output_file = NamedTemporaryFile()
|
output_file = NamedTemporaryFile()
|
||||||
bill_html = render_to_string("bill.html.j2", {'bill': bill})
|
bill_html = render_to_string("bill.html.j2", {'bill': bill})
|
||||||
|
|
Loading…
Reference in a new issue