change_object

class camelot.view.action_steps.change_object.ChangeField(admin, field_attributes=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.

This action step returns a tuple with the name of the selected field, and its new value.

render()[source]

create the dialog. this method is used to unit test the action step.

class camelot.view.action_steps.change_object.ChangeFieldDialog(admin, field_attributes, 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
get_object()[source]

Use this method to get access to the object to change in unit tests

Returns:the object to change
class camelot.view.action_steps.change_object.ChangeObjectDialog(obj, admin, 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
../../../_images/change_object.png
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.
../../../_images/import_from_file_preview.png
get_objects()[source]

Use this method to get access to the objects to change in unit tests

Returns:the object to change
render()[source]

create the dialog. this method is used to unit test the action step.

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
../../../_images/change_object.png

Previous topic

backup

Next topic

gui

This Page