2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 12:05:53 +00:00

mixin for full app functions

mainly migrations right now
This commit is contained in:
Matthias
2021-10-04 00:48:21 +02:00
parent b31c7ccd24
commit 0333b3fc72
2 changed files with 24 additions and 0 deletions

View File

@ -163,6 +163,25 @@ class NavigationMixin:
does this plugin define navigation elements
"""
return bool(self.navigation)
class AppMixin:
"""Mixin that enables full django app functions for a plugin"""
class Meta:
"""meta options for this mixin"""
MIXIN_NAME = 'App registration'
def __init__(self):
super().__init__()
self.add_mixin('app', 'has_app', __class__)
@property
def has_app(self):
"""
this plugin is always an app with this plugin
"""
return True
# endregion