Waitinglist: fix batch selection, add event.slug to download-filename (#2116)

* fix missing id in inputs for batch delete

* add event.slug to filename
This commit is contained in:
Richard Schreiber
2021-06-09 13:21:02 +02:00
committed by GitHub
parent b1dee5ae7c
commit fccd119a1f
2 changed files with 5 additions and 2 deletions

View File

@@ -312,9 +312,12 @@ class WaitingListView(EventPermissionRequiredMixin, WaitingListQuerySetMixin, Pa
writer.writerow(row)
r = HttpResponse(output.getvalue().encode("utf-8"), content_type='text/csv')
r['Content-Disposition'] = 'attachment; filename="waitinglist.csv"'
r['Content-Disposition'] = 'attachment; filename="{}.csv"'.format(self.get_filename())
return r
def get_filename(self):
return '{}_waitinglist'.format(self.request.event.slug)
class EntryDelete(EventPermissionRequiredMixin, DeleteView):
model = WaitingListEntry