diff --git a/apis_core/apis_history/tables.py b/apis_core/apis_history/tables.py new file mode 100644 index 000000000..d8ff44dd6 --- /dev/null +++ b/apis_core/apis_history/tables.py @@ -0,0 +1,20 @@ +from apis_core.generic.tables import CustomTemplateColumn, ViewColumn +import django_tables2 as tables + + +class DescriptionColumnHistory(CustomTemplateColumn): + """ + A column showing a model description + """ + + template_name = "apis_history/columns/description.html" + orderable = False + + +class APISHistoryTableBaseTable(tables.Table): + history_id = tables.Column(verbose_name="ID") + desc = DescriptionColumnHistory() + view = ViewColumn() + + class Meta: + fields = ["history_id", "desc", "view"] diff --git a/apis_core/apis_history/templates/apis_history/columns/description.html b/apis_core/apis_history/templates/apis_history/columns/description.html new file mode 100644 index 000000000..e3109ba9d --- /dev/null +++ b/apis_core/apis_history/templates/apis_history/columns/description.html @@ -0,0 +1,2 @@ +{% load apisgeneric %} +{{ record }} \ No newline at end of file