From b01d7d1984216d7eac031721a6e61138611bb625 Mon Sep 17 00:00:00 2001 From: Jason Heppler Date: Thu, 15 Aug 2024 15:19:59 -0500 Subject: [PATCH] refactor: Update DocumentDetailView context initialization --- denig/views.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/denig/views.py b/denig/views.py index cf678f0..1db641b 100644 --- a/denig/views.py +++ b/denig/views.py @@ -165,18 +165,20 @@ def get_context_data(self, **kwargs): else: forensic_images = None - context = { - "previous_page": previous_page, - "next_page": next_page, - "next_page_id": next_page_id, - "current_page": current_page, - "page_number": page_number, - "cleaned_url": cleaned_url, - "next_image_url": cleaned_next_image_url, - "all_pages": Document.objects.all().order_by("document_id"), - "fragments": self.object.fragment_set.order_by("line_number"), - "forensic_images": forensic_images, - } + context.update( + { + "previous_page": previous_page, + "next_page": next_page, + "next_page_id": next_page_id, + "current_page": current_page, + "page_number": page_number, + "cleaned_url": cleaned_url, + "next_image_url": cleaned_next_image_url, + "all_pages": Document.objects.all().order_by("document_id"), + "fragments": self.object.fragment_set.order_by("line_number"), + "forensic_images": forensic_images, + } + ) return context