From 9c9b3084939e77618854e2cbe3cce51029a70f07 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Mon, 5 Aug 2024 21:20:21 +0100 Subject: wip: adding delete and replace buttons for PDFs --- pyblackbird_cc/resources/urls.py | 2 +- pyblackbird_cc/resources/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'pyblackbird_cc/resources') diff --git a/pyblackbird_cc/resources/urls.py b/pyblackbird_cc/resources/urls.py index 45bfd59..34ea0c8 100644 --- a/pyblackbird_cc/resources/urls.py +++ b/pyblackbird_cc/resources/urls.py @@ -14,7 +14,7 @@ urlpatterns = [ name="resource_update_metadata", ), path("resource/update-thumbnails/", views.update_resource_thumbnails, name="resource_update_thumbnails"), - path("resource/update-pdfs/", views.update_resource_pdfs, name="resource_update_pdfs"), + path("resource/add-pdfs/", views.add_resource_pdfs, name="resource_update_pdfs"), ] htmx_patterns = [ diff --git a/pyblackbird_cc/resources/views.py b/pyblackbird_cc/resources/views.py index 8958339..5922151 100644 --- a/pyblackbird_cc/resources/views.py +++ b/pyblackbird_cc/resources/views.py @@ -341,7 +341,7 @@ def update_resource_metadata(request, pk): # Change resource_id to pk @login_required() -def update_resource_pdfs(request, pk): +def add_resource_pdfs(request, pk): resource = get_object_or_404(Resource, pk=pk) if request.method == "POST": form = ResourceUpdatePDFsForm(request.POST, request.FILES) -- cgit v1.2.3