change_object¶
- class camelot.view.action_steps.change_object.ChangeField(admin, field_attributes=None, field_name=None)[source]¶
Pop up a list of fields from an object a user can change. When the user selects a field, an appropriate widget is shown to change the value of that field.
Parameters: - admin – the admin of the object of which to change the field
- field_attributes – a list of field attributes of the fields that can be changed. If None is given, all fields are shown.
- field_name – the name of the selected field when opening the dialog
This action step returns a tuple with the name of the selected field, and its new value.
- class camelot.view.action_steps.change_object.ChangeFieldDialog(admin, field_attributes, field_name, parent=None, flags=3)[source]¶
A dialog to change a field of an object.
- class camelot.view.action_steps.change_object.ChangeObject(obj, admin=None)[source]¶
Pop up a form for the user to change an object
Parameters: - obj – the object to change
- admin – an instance of an admin class to use to edit the object, None if the default is to be taken
- accept¶
The text shown in the accept button
- reject¶
The text shown in the reject button
- class camelot.view.action_steps.change_object.ChangeObjectDialog(obj, admin, form_display, columns, form_actions, accept, reject, title=_('Please complete'), subtitle=_('Complete the form and press the OK button'), icon=Icon('tango/22x22/categories/preferences-system.png'), parent=None, flags=3)[source]¶
A dialog to change an object. This differs from a FormView in that it does not contains Actions, and has an OK button that is enabled when the object is valid.
Parameters: - obj – The object to change
- admin – The admin class used to create a form
- class camelot.view.action_steps.change_object.ChangeObjects(objects, admin)[source]¶
Pop up a list for the user to change objects
Parameters: - objects – a list of objects to change
- admin – an instance of an admin class to use to edit the objects.
This action step can be customised using these attributes :
- window_title¶
the window title of the dialog shown
- title¶
the title of the dialog shown
- subtitle¶
the subtitle of the dialog shown
- icon¶
the camelot.view.art.Icon in the top right corner of the dialog
- class camelot.view.action_steps.change_object.ChangeObjectsDialog(objects, admin, parent=None, flags=1)[source]¶
A dialog to change a list of objects. This differs from a ListView in that it does not contains Actions, and has an OK button that is enabled when all objects are valid.
Parameters: - objects – The object to change
- admin – The admin class used to create a form