2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-27 19:16:44 +00:00

Update plugin docs (#9144)

- Add examples for new types of settings features
This commit is contained in:
Oliver 2025-02-22 17:47:33 +11:00 committed by GitHub
parent bd7e515856
commit 4cacf83294
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,7 +50,7 @@ class PluginWithSettings(SettingsMixin, InvenTreePlugin):
},
'NUMBER': {
'name': _('A Name'),
'description': _('Descripe me here'),
'description': _('Describe me here'),
'default': 6,
'validator': [
int,
@ -58,6 +58,20 @@ class PluginWithSettings(SettingsMixin, InvenTreePlugin):
MaxValueValidator(25)
]
},
'ASSEMBLY': {
'name': _('Assembled Part'),
'description': _('Settings can point to internal database models'),
'model': 'part.part',
'filters': {
'active': True,
'assembly': True
}
},
'GROUP': {
'name': _('User Group'),
'description': _('Select a group of users'),
'model': 'auth.group'
},
'HIDDEN_SETTING': {
'name': _('Hidden Setting'),
'description': _('This setting is hidden from the automatically generated plugin settings page'),