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

Add oneliner

parent a54da7ac
No related branches found
No related tags found
1 merge request!19Change json export to assemble a dict instead of sts in the template
Pipeline #274392 passed
...@@ -3,7 +3,18 @@ ...@@ -3,7 +3,18 @@
{% load tz %} {% load tz %}
{% block content %} {% block content %}
<p>
Exported JSON:
<pre>
{{ json_data_oneline }}
</pre>
</p>
<p>
Exported JSON (indented for better readability):
<pre> <pre>
{{ json_data }} {{ json_data }}
</pre> </pre>
</p>
{% endblock %} {% endblock %}
...@@ -193,6 +193,7 @@ class AKJSONExportView(AdminViewMixin, FilterByEventSlugMixin, ListView): ...@@ -193,6 +193,7 @@ class AKJSONExportView(AdminViewMixin, FilterByEventSlugMixin, ListView):
data["participants"] = [] data["participants"] = []
data["aks"] = [ak.as_json_dict() for ak in context["slots"]] data["aks"] = [ak.as_json_dict() for ak in context["slots"]]
context["json_data_oneline"] = json.dumps(data)
context["json_data"] = json.dumps(data, indent=2) context["json_data"] = json.dumps(data, indent=2)
return context 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