Skip to content

Commit

Permalink
refactor: Update DocumentDetailView context initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
hepplerj committed Aug 15, 2024
1 parent 5605126 commit b01d7d1
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions denig/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b01d7d1

Please sign in to comment.