field_action

ModelContext, GuiContext and Actions that are used in the context of editing a single field on a form or in a table. This module contains the various actions that are beyond the icons shown in the editors of a form.

class camelot.admin.action.field_action.ClearObject[source]

Set the new value of the editor to None

class camelot.admin.action.field_action.DetachFile[source]

Set the new value of the editor to None, leaving the actual file in the storage alone

class camelot.admin.action.field_action.FieldAction[source]

Action class that renders itself as a toolbutton, small enough to fit in an editor

class camelot.admin.action.field_action.FieldActionGuiContext[source]

The context for an Action on a field. On top of the attributes of the camelot.admin.action.application_action.ApplicationActionGuiContext, this context contains :

editor

the editor through which the field is edited.

model_context

alias of FieldActionModelContext

class camelot.admin.action.field_action.FieldActionModelContext[source]

The context for a Action on a field. On top of the attributes of the camelot.admin.action.application_action.ApplicationActionGuiContext, this context contains :

obj

the object of which the field displays a field

field

the name of the field that is being displayed

attribute:: value

the value of the field as it is displayed in the editor

field_attributes

A dictionary of field attributes of the field to which the context relates.

class camelot.admin.action.field_action.NewObject[source]

Open a form for the creation of a new object, and set this object as the new value of the editor

class camelot.admin.action.field_action.OpenFile[source]

Open the file shown in the editor

class camelot.admin.action.field_action.OpenObject[source]

Open the value of an editor in a form view

class camelot.admin.action.field_action.SaveFile[source]

Copy the file shown in the editor to another location

class camelot.admin.action.field_action.SelectObject[source]

Allows the user to select an object, and set the selected object as the new value of the editor

class camelot.admin.action.field_action.UploadFile[source]

Upload a new file into the storage of the field