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:
@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user