Skip to content
Snippets Groups Projects
Commit 77f4dac9 authored by Felix Blanke's avatar Felix Blanke
Browse files

Add more event info to json export

parent 6147e386
No related branches found
No related tags found
1 merge request!3Merge into fork's `main` branch
Pipeline #236512 passed
......@@ -144,7 +144,15 @@ class AKJSONExportView(AdminViewMixin, FilterByEventSlugMixin, ListView):
context["timeslots"] = json.dumps(timeslots)
context["info_dict"] = {}
info_dict = {
"title": self.event.name,
"slug": self.event.slug
}
for attr in ["contact_email", "place"]:
if hasattr(self.event, attr) and getattr(self.event, attr):
info_dict[attr] = getattr(self.event, attr)
context["info_dict"] = json.dumps(info_dict)
return context
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment