Unverified Commit 3b069f4b authored by Enrico Zini's avatar Enrico Zini
Browse files

Export as an attachment to make saving easier

parent d0d755f0
Pipeline #161559 passed with stage
in 1 minute and 50 seconds
......@@ -60,15 +60,18 @@ class ExportSources(VisitorMixin, View):
json.dump(data, res, indent=2)
return res
class ExportDB(VisitorMixin, View):
require_visitor = "dd"
def get(self, request, *args, **kw):
data = export_public_data()
res = http.HttpResponse(content_type="application/json")
json.dump(data, res, indent=2)
res["Content-Disposition"] = "attachment; filename=contributors-public.json"
json.dump(data, res, indent=2)
return res
class Logs(TemplateView):
template_name = "importer/logs.html"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment