dip.shell.tools.form

This module contains a base implementation of a tool that handles the editing of a model using a form.

FormTool

class dip.shell.tools.form.FormTool

Base class: BaseManagedModelTool

The FormTool class is a tool that uses an automatically generated view (a Form by default) to manipulate a managed model.

area = Str()

The identifier of the area where the view should be placed.

controller_factory = Callable()

The controller factory. This must return an object that implements or can be adapted to the IController interface.

model_type = Instance(type)

The type of model that the tool can handle.

view_factory = Instance(ViewFactory)

The factory used to create the tool’s views.

create_views(model)

Create the views for a managed model.

Parameters:model – is the model.
Returns:the list of views.
handles(model)

Check if the tool can handle a particular model.

Parameters:model – is the model.
Returns:True if a tool can handle the model.