Skip to content

Commit

Permalink
fix: adds link to original object; uses triple filterset
Browse files Browse the repository at this point in the history
  • Loading branch information
sennierer committed Mar 5, 2024
1 parent 039666d commit c867649
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apis_core/apis_history/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,18 @@ class DescriptionColumnHistory(CustomTemplateColumn):
orderable = False


class OriginalIDColumn(CustomTemplateColumn):
"""
A column showing the original id of a model instance
"""

template_name = "apis_history/columns/original_id.html"
orderable = False


class APISHistoryTableBaseTable(tables.Table):
history_id = tables.Column(verbose_name="ID")
orig_id = OriginalIDColumn()
desc = DescriptionColumnHistory()
view = ViewColumn()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{% load apisgeneric %}
<a href="{% url 'apis_core:generic:detail' record.instance|contenttype record.id %}">{{ record.id }}</a>

0 comments on commit c867649

Please sign in to comment.