mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
add mixins to API
This commit is contained in:
parent
a996be3f5c
commit
530227e15f
@ -52,6 +52,10 @@ class PluginConfig(models.Model):
|
|||||||
name += '(not active)'
|
name += '(not active)'
|
||||||
return name
|
return name
|
||||||
|
|
||||||
|
# extra attributes form the registry
|
||||||
|
def mixins(self):
|
||||||
|
return self.plugin._mixinreg
|
||||||
|
|
||||||
# functions
|
# functions
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
@ -17,6 +17,7 @@ class PluginConfigSerializer(serializers.ModelSerializer):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
meta = serializers.DictField(read_only=True)
|
meta = serializers.DictField(read_only=True)
|
||||||
|
mixins = serializers.DictField(read_only=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = PluginConfig
|
model = PluginConfig
|
||||||
@ -25,4 +26,5 @@ class PluginConfigSerializer(serializers.ModelSerializer):
|
|||||||
'name',
|
'name',
|
||||||
'active',
|
'active',
|
||||||
'meta',
|
'meta',
|
||||||
|
'mixins',
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user