Fixes links on import page

This commit is contained in:
Mouse Reeve 2022-02-03 13:49:33 -08:00
parent 582b84ecaa
commit 3b12af63b6
2 changed files with 4 additions and 2 deletions

View file

@ -47,7 +47,7 @@
<span class="icon icon-spinner is-pulled-left" aria-hidden="true"></span>
<span>{% trans "In progress" %}</span>
<span class="is-pulled-right">
<a href="#" class="button is-small">{% trans "Refresh" %}</a>
<a href="{% url 'import-status' job.id %}" class="button is-small">{% trans "Refresh" %}</a>
</span>
</div>
<div class="is-flex">
@ -230,7 +230,7 @@
{% if not legacy %}
<div>
{% include 'snippets/pagination.html' with page=items %}
{% include 'snippets/pagination.html' with page=items path=page_path %}
</div>
{% endif %}
{% endspaceless %}{% endblock %}

View file

@ -5,6 +5,7 @@ from django.core.paginator import Paginator
from django.shortcuts import get_object_or_404, redirect
from django.template.response import TemplateResponse
from django.utils.decorators import method_decorator
from django.urls import reverse
from django.views import View
from bookwyrm import models
@ -35,6 +36,7 @@ class ImportTroubleshoot(View):
page.number, on_each_side=2, on_ends=1
),
"complete": True,
"page_path": reverse("import-troubleshoot", args=[job.id]),
}
return TemplateResponse(request, "import/troubleshoot.html", data)