Put event slugs in export filenames (#768)

This commit is contained in:
Tobias Kunze
2018-02-12 12:30:13 +01:00
committed by Raphael Michel
parent ded539ce7a
commit 741d0bc686
4 changed files with 4 additions and 4 deletions

View File

@@ -55,7 +55,7 @@ class AnswerFilesExporter(BaseExporter):
i.file.close()
with open(os.path.join(d, 'tmp.zip'), 'rb') as zipf:
return 'answers.zip', 'application/zip', zipf.read()
return '{}_answers.zip'.format(self.event.slug), 'application/zip', zipf.read()
@receiver(register_data_exporters, dispatch_uid="exporter_answers")