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:
parent
bd7e515856
commit
4cacf83294
@ -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'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user