Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Debian New Member Process
contributors.debian.org
Commits
3b069f4b
Unverified
Commit
3b069f4b
authored
Aug 02, 2020
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
importer/views.py
View file @
3b069f4b
...
...
@@ -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"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment