Skip to content

Commit

Permalink
adds AdminToolsGroup and AdminToolsEntry dataclasses for programmatic…
Browse files Browse the repository at this point in the history
…ally generating AdminTools pages
  • Loading branch information
jontsai committed May 28, 2024
1 parent ba13b68 commit bcb75c7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions admintools/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,26 @@ def key(self):
@property
def exclusion_pattern(self):
return f'{self.directory}/'


@dataclass
class AdminToolsEntry:
"""Admin Tools Entry
This class specifies an admin tool.
"""

name: str
url_name: str


@dataclass
class AdminToolsGroup:
"""Admin Tools Group
This class specifies a group of admin tools.
"""

name: str
icon: str
tools: list[AdminToolsEntry]

0 comments on commit bcb75c7

Please sign in to comment.