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

Add more event info to json export

parent 89155021
No related branches found
No related tags found
1 merge request!268Merge fork for interoperability of KoMa solver
...@@ -144,7 +144,15 @@ class AKJSONExportView(AdminViewMixin, FilterByEventSlugMixin, ListView): ...@@ -144,7 +144,15 @@ class AKJSONExportView(AdminViewMixin, FilterByEventSlugMixin, ListView):
context["timeslots"] = json.dumps(timeslots) 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 return context
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment