Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions inspector/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,12 @@ def distribution(project_name, version, first, second, rest, distname):
links=file_urls,
h2=f"{project_name}",
h2_link=f"/project/{project_name}",
h2_paren="View this project on PyPI",
h2_paren_link=f"https://pypi.org/project/{project_name}",
h3=f"{project_name}=={version}",
h3_link=f"/project/{project_name}/{version}",
h3_paren="View this release on PyPI",
h3_paren_link=f"https://pypi.org/project/{project_name}/{version}",
h4=distname,
h4_link=f"/project/{project_name}/{version}/packages/{first}/{second}/{rest}/{distname}/", # noqa
)
Expand All @@ -212,12 +216,18 @@ def file(project_name, version, first, second, rest, distname, filepath):
return render_template(
"code.html",
code=contents,
h2=f"{project_name}=={version}",
h2_link=f"/project/{project_name}/{version}",
h3=distname,
h3_link=f"/project/{project_name}/{version}/packages/{first}/{second}/{rest}/{distname}/", # noqa
h4=filepath,
h4_link=f"/project/{project_name}/{version}/packages/{first}/{second}/{rest}/{distname}/{filepath}", # noqa
h2=f"{project_name}",
h2_link=f"/project/{project_name}",
h2_paren="View this project on PyPI",
h2_paren_link=f"https://pypi.org/project/{project_name}",
h3=f"{project_name}=={version}",
h3_link=f"/project/{project_name}/{version}",
h3_paren="View this release on PyPI",
h3_paren_link=f"https://pypi.org/project/{project_name}/{version}",
h4=distname,
h4_link=f"/project/{project_name}/{version}/packages/{first}/{second}/{rest}/{distname}/", # noqa
h5=filepath,
h5_link=f"/project/{project_name}/{version}/packages/{first}/{second}/{rest}/{distname}/{filepath}", # noqa
)
else:
return "Distribution type not supported"
Expand Down
7 changes: 7 additions & 0 deletions inspector/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ <h4>
{{ h4 }}
{% endif %}
</h4>
<h5>
{% if h5_link %}
<a href="{{ h5_link }}">{{ h5 }}</a>
{% else %}
{{ h5 }}
{% endif %}
</h4>
{% block body %}{% endblock %}
</body>
<footer>
Expand Down