Skip to content

Commit

Permalink
feat(tables): add TitleFieldsMixin
Browse files Browse the repository at this point in the history
Add a table class which sets attribute `fields`
in its `Meta` class to various title fields.
For reuse in a number of entity table classes
which rely heavily on their title fields (to
reduce redundancy).
  • Loading branch information
koeaw committed Dec 9, 2024
1 parent f68e0c3 commit 3170969
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apis_ontology/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,8 @@ class Meta(AbstractEntityTable.Meta):
"delete",
"noduplicate",
)


class TitleFieldsMixin(tables.Table):
class Meta:
fields = ["title", "subtitle"]

0 comments on commit 3170969

Please sign in to comment.