Skip to content
Snippets Groups Projects
Verified Commit 7d0a8bc2 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Add classmethod() extension utility to ExtensibleModel

parent 30d0e737
Branches
Tags
No related merge requests found
......@@ -141,6 +141,12 @@ class ExtensibleModel(CRUDMixin):
cls._safe_add(func, func.__name__)
@classmethod
def classmethod(cls, func: Callable[[], Any], name: Optional[str] = None) -> None:
""" Adds the passed callable as a classmethod. """
cls._safe_add(classmethod(func), func.__name__)
@classmethod
def field(cls, **kwargs) -> None:
""" Adds the passed jsonstore field. Must be one of the fields in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment