Skip to content

Commit 205ae2e

Browse files
authored
Link to API token form from manage project page (#6586)
1 parent e06e40e commit 205ae2e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

warehouse/templates/manage/settings.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@
2020
{% block main %}
2121
<h2>Project settings</h2>
2222

23+
<h3>API tokens</h3>
24+
<p>API tokens provide an alternative way to authenticate when uploading packages to PyPI.</p>
25+
{% if user.has_primary_verified_email %}
26+
<p class="no-bottom-padding">
27+
<a href="{{ request.route_path('manage.account.token') }}" class="button button--primary">Create a token for {{ project.name }}</a>
28+
</p>
29+
{% else %}
30+
<p class="no-bottom-padding">
31+
<a href="{{ request.route_path('manage.account') }}#account-emails">Verify your primary email address</a> to add an API token for {{ project.name }}.
32+
</p>
33+
{% endif %}
34+
<hr>
35+
2336
<div class="callout-block" data-controller="dismissable" data-dismissable-identifier="settings">
2437
<h3>Project description and sidebar</h3>
2538
<p>

0 commit comments

Comments
 (0)