Merge pull request #1429 from umap-project/download-from-dashboard

Reuse the map_download view/url for the dashboard
This commit is contained in:
David Larlet 2023-11-24 17:03:21 -05:00 committed by GitHub
commit bef217bd3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -25,9 +25,9 @@
<a href="{{ map_inst.owner.get_url }}">{{ map_inst.owner }}</a> <a href="{{ map_inst.owner.get_url }}">{{ map_inst.owner }}</a>
</td> </td>
<td> <td>
<a href="{{ map_inst.get_absolute_url }}?share">{% translate "Share" %}</a> <a href="{{ map_inst.get_absolute_url }}?share">{% translate "Share" %}</a> |
<a href="{{ map_inst.get_absolute_url }}?edit">{% translate "Edit" %}</a> <a href="{{ map_inst.get_absolute_url }}?edit">{% translate "Edit" %}</a> |
<a href="{{ map_inst.get_absolute_url }}?download">{% translate "Download" %}</a> <a href="{% url 'map_download' map_inst.pk %}">{% translate "Download" %}</a>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}

View file

@ -280,7 +280,7 @@ def test_user_dashboard_display_user_maps(client, map):
assert map.name in body assert map.name in body
assert f"{map.get_absolute_url()}?edit" in body assert f"{map.get_absolute_url()}?edit" in body
assert f"{map.get_absolute_url()}?share" in body assert f"{map.get_absolute_url()}?share" in body
assert f"{map.get_absolute_url()}?download" in body assert f"/map/{map.pk}/download" in body
assert "Everyone (public)" in body assert "Everyone (public)" in body
assert "Owner only" in body assert "Owner only" in body