Skip to content

Commit d14115a

Browse files
committed
Flyout: return data required to generate flyout dynamically
1 parent f83eee6 commit d14115a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

readthedocs/proxito/views/hosting.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,25 @@ def get(self, request):
5959
),
6060
},
6161
"doc_diff": True,
62+
"flyout": {
63+
"translations": [],
64+
"versions": [
65+
{
66+
"slug": version.slug,
67+
"url": f"/{project.language}/{version.slug}/",
68+
}
69+
for version in project.versions.filter(active=True)
70+
],
71+
"downloads": [],
72+
# TODO: get this values properly
73+
"vcs": {
74+
"url": "https://github.com",
75+
"username": "readthedocs",
76+
"repository": "test-builds",
77+
"branch": version.identifier,
78+
"filepath": "/docs/index.rst",
79+
},
80+
},
6281
},
6382
}
6483

0 commit comments

Comments
 (0)