Index
hypha.core.wagtail.admin
¶
SettingModelAdmin
¶
Bases: WagtailRegisterable
The core SettingModelAdmin class. It has minimal implementation that allows adding a SettingModelAdmin class just like ModelAdmin to the ModelGroupAdmin as an item.
The BaseSiteSetting still needs to be registered with @register_setting
decorator
and will show up in the setting menu.
Don't allow initialization unless self.model is set to a valid model
Source code in hypha/core/wagtail/admin/options.py
permission_helper
instance-attribute
¶
get_menu_item
¶
get_admin_urls_for_registration
¶
get_permission_helper_class
¶
Returns a permission_helper class to help with permission-based logic for the given model.
Copied from the wagtail's ModelAdmin
Source code in hypha/core/wagtail/admin/options.py
get_permissions_for_registration
¶
Utilised by Wagtail's 'register_permissions' hook to allow permissions for a model to be assigned to groups in settings. This is only required if the model isn't a Page model, and isn't registered as a Snippet
Copied from the wagtail's ModelAdmin