Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jelle van der Waa
Archweb
Commits
a9eae9ad
Commit
a9eae9ad
authored
Mar 24, 2018
by
Jelle van der Waa
🚧
Committed by
Angel Velásquez
Mar 23, 2018
Browse files
FS#50516: mirrors: Extend /mirrors/status/json/ (#91)
Add the ipv4/ipv6 availability to the /mirrors/status/json api.
parent
165cb10f
Changes
1
Hide whitespace changes
Inline
Side-by-side
mirrors/views/api.py
View file @
a9eae9ad
...
...
@@ -27,6 +27,8 @@ def default(self, obj):
data
[
'country'
]
=
unicode
(
country
.
name
)
data
[
'country_code'
]
=
country
.
code
data
[
'isos'
]
=
obj
.
mirror
.
isos
data
[
'ipv4'
]
=
obj
.
has_ipv4
data
[
'ipv6'
]
=
obj
.
has_ipv6
data
[
'details'
]
=
obj
.
get_full_url
()
return
data
if
isinstance
(
obj
,
MirrorProtocol
):
...
...
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