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)'
|
||||
return name
|
||||
|
||||
# extra attributes form the registry
|
||||
def mixins(self):
|
||||
return self.plugin._mixinreg
|
||||
|
||||
# functions
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
@ -17,6 +17,7 @@ class PluginConfigSerializer(serializers.ModelSerializer):
|
||||
"""
|
||||
|
||||
meta = serializers.DictField(read_only=True)
|
||||
mixins = serializers.DictField(read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = PluginConfig
|
||||
@ -25,4 +26,5 @@ class PluginConfigSerializer(serializers.ModelSerializer):
|
||||
'name',
|
||||
'active',
|
||||
'meta',
|
||||
'mixins',
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user