feat: a link in download section
This commit is contained in:
@@ -13,6 +13,14 @@ def package_button_labels(product):
|
||||
}
|
||||
|
||||
|
||||
def downloads_section_link(product):
|
||||
url = (getattr(product, "downloads_section_link_url", "") or "").strip()
|
||||
text = (getattr(product, "downloads_section_link_text", "") or "").strip()
|
||||
if url and text:
|
||||
return {"url": url, "text": text}
|
||||
return None
|
||||
|
||||
|
||||
def featured_version(qs):
|
||||
ordered = qs.order_by("order", "pk")
|
||||
cand = ordered.filter(is_featured_stable=True).first()
|
||||
@@ -38,6 +46,7 @@ def build_release_context(distribution, active_versions, product):
|
||||
"show_older_versions_link": False,
|
||||
"package_versions": [],
|
||||
**package_button_labels(product),
|
||||
"downloads_section_link": downloads_section_link(product),
|
||||
}
|
||||
|
||||
if distribution == DISTRIBUTION_INSTALLABLE:
|
||||
|
||||
Reference in New Issue
Block a user