generated from MinBZK/python-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
590 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from collections.abc import Callable | ||
|
||
from fastapi import Request | ||
|
||
from ..schema.localized_value_item import LocalizedValueItem | ||
from .localizable import LocalizableEnum, get_localized_enums | ||
|
||
|
||
class GroupByCategories(LocalizableEnum): | ||
LIFECYCLE = "levenscyclus" | ||
|
||
@classmethod | ||
def get_display_values(cls: type["GroupByCategories"], _: Callable[[str], str]) -> dict["GroupByCategories", str]: | ||
return { | ||
cls.LIFECYCLE: _("Lifecycle"), | ||
} | ||
|
||
|
||
def get_localized_group_by_categories(request: Request) -> list[LocalizedValueItem | None]: | ||
return get_localized_enums(GroupByCategories, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.