mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Add option to hide plugin setting from auto-generated plugin setting page (#4767)
* Add option to hide plugin setting from auto-generated plugin setting page * Change hide to hidden * Added small note to docs about hidden settings Co-authored-by: Oliver <oliver.henry.walters@gmail.com> --------- Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
		| @@ -52,9 +52,17 @@ class PluginWithSettings(SettingsMixin, InvenTreePlugin): | ||||
|                 MaxValueValidator(25) | ||||
|             ] | ||||
|         }, | ||||
|         'HIDDEN_SETTING': { | ||||
|             'name': _('Hidden Setting'), | ||||
|             'description': _('This setting is hidden from the automatically generated plugin settings page'), | ||||
|             'hidden': True, | ||||
|         } | ||||
|     } | ||||
| ``` | ||||
|  | ||||
| !!! tip "Hidden Settings" | ||||
|     Plugin settings can be hidden from the settings page by marking them as 'hidden' | ||||
|  | ||||
| This mixin defines the helper functions `plugin.get_setting` and `plugin.set_setting` to access all plugin specific settings: | ||||
|  | ||||
| ```python | ||||
|   | ||||
		Reference in New Issue
	
	Block a user