AppView(*args: Any, **kwargs: Any)¶
A generic view for showing an app’s main page.
The view and it’s template may be customized but by default show the following:
Icon for the app
Name of the app
Description of the app
Link to the manual page for the app
A button to enable/disable the app
A toolbar with common actions such as ‘Run diagnostics’
A status section showing the running status of the app
A form for configuring the app
The following class properties are available on the view:
‘app_id’ is the mandatory property to set the ID of the app. It is used to retrieve the App instance for the app that is needed for basic information and operations such as enabling/disabling the app.
‘form_class’ is the Django form class that is used by this view. It may be None if the app does not have a configuration form. Default is None.
‘template_name’ is the template used to render this view. By default it is app.html. It may be overridden with a template that derives from app.html to customize the appearance of the app to achieve more complex presentation instead of the simple appearance provided by default.
Initialize the view.
Return the app for which this view is configured.
Form handling for enabling / disabling apps.
Enable/disable a service and set messages.
Add service to the context data.
Return an instance of the app enable/disable form.
If the app can’t be disabled by the user, return None.
Return an instance of this view’s form.
Also the form_class for this view to be None.
Return the status of the app to fill in the form.
post(request, *args, **kwargs)¶
Handle app enable/disable button separately.