X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d713c61258bf1fcebea7e21065ac2878f5bf45be..ab81d95154bd35a67078cc6c926b5b9fbdd9011b:/apps/reporting/views.py?ds=sidebyside diff --git a/apps/reporting/views.py b/apps/reporting/views.py index 961a682a1..8cb2715d5 100644 --- a/apps/reporting/views.py +++ b/apps/reporting/views.py @@ -30,11 +30,14 @@ def stats_page(request): else: mt['deprecated'] = '-' + licenses = set(((b.extra_info.get('license'), b.extra_info.get('license_description')) + for b in Book.objects.all().iterator() if b.extra_info.get('license'))) + return render_to_response('reporting/main.html', locals(), context_instance=RequestContext(request)) -@generated_file_view('reports/katalog.pdf', 'application/pdf', +@generated_file_view('reports/katalog.pdf', 'application/pdf', send_name=lambda: 'wolnelektury_%s.pdf' % date.today(), signals=[Book.published]) def catalogue_pdf(path): @@ -44,7 +47,7 @@ def catalogue_pdf(path): }) -@generated_file_view('reports/katalog.csv', 'application/csv', +@generated_file_view('reports/katalog.csv', 'application/csv', send_name=lambda: 'wolnelektury_%s.csv' % date.today(), signals=[Book.published]) def catalogue_csv(path):