Manager Reference

The managers Module

A CioXml2 file manager collection.

cioxml2.managers.includeme(configurator: Configurator)[source]

Function to include CioXml2 managers.

Parameters:

configurator (pyramid.config.Configurator) – Object used to do configuration declaration within the application.

The managers.xml Module

A file manager for generic XML files.

cioxml2.managers.xml.includeme(configurator: Configurator)[source]

Function to include a CioWarehouse2 manager.

Parameters:

configurator (pyramid.config.Configurator) – Object used to do configuration declaration within the application.

class cioxml2.managers.xml.ManagerXml[source]

Class to manage a generic XML file.

viewings and editings dictionaries have the following additional keys:

  • 'xsl': XSL file to transform the XML file

  • 'image_paths': list of paths to dynamically find images

  • 'image_extensions': list of authorized extensions for images

  • 'audio_paths': list of paths to dynamically find audios

  • 'audio_extensions': list of authorized extensions for audio

  • 'video_paths': list of paths to dynamically find videos

  • 'video_extensions': list of authorized extensions for videos

The three last fields can contain the following tag:

  • {directory}: path of the directory containing the input file

view(request: Request, warehouse: Warehouse, ciopath: CioPath, ts_factory=None) str | None[source]

Return a string containing HTML to display the file.

See: ciowarehouse2.lib.manager.Manager.view()

edit(request: Request, warehouse: Warehouse, ciopath: CioPath, ts_factory=None) str | None[source]

Return a string containing HTML to edit the file.

See: ciowarehouse2.lib.manager.Manager.edit()

edit_cxe(request: Request, warehouse: Warehouse, ciopath: CioPath, editing: dict) tuple[Form | None, str, str | None][source]

Return a string containing HTML to edit in a WYSIWYM manner.

Parameters:
Return type:

tuple

Returns:

A tuple such as (form, frame, class).

edit_mask(request: Request, warehouse: Warehouse, ciopath: CioPath, editing: dict, tree: ElementTree | None = None, in_panel: bool = False) tuple[Form | None, str, str | None, ElementTree | None][source]

Return a string containing HTML to edit the file with a mask.

Parameters:
Return type:

tuple

Returns:

A tuple such as (form, frame, class, original).

classmethod edit_xml(request: Request, warehouse: Warehouse, ciopath: CioPath, content: str | None = None) tuple[Form, str][source]

Return a string containing HTML to edit the file as XML.

Parameters:
  • request (pyramid.request.Request) – Current request.

  • warehouse (.lib.warehouse.Warehouse) – Object describing the warehouse containing the file.

  • path (str) – Relative path to the file.

  • content – (optional) Content of the file.

Return type:

tuple

Returns:

A tuple such as (form, frame).

save(request: Request, warehouse: Warehouse, ciopath: CioPath, editing: dict, values: dict, go_on: bool, original: ElementTree | None = None) str | None[source]

Save the XML file.

See: ciowarehouse2.lib.manager.Manager.save()

xml2html(request: Request, warehouse: Warehouse, ciopath: CioPath, rendering: dict, mode: str = 'view', tree: ElementTree | None = None, in_panel: bool = False) tuple[str | None, str | None, ElementTree | None][source]

Thanks to a XSL file, return a piece of HTML to display or edit a file.

Parameters:
  • request (pyramid.request.Request) – Current request.

  • warehouse (ciowarehouse2.lib.warehouse.Warehouse) – Object describing the warehouse containing the file.

  • cioppathCioPath of the current file.

  • rendering (dict) – Dictionary defining the rendering.

  • mode (str) – (optional) Display mode (‘view, ‘frame’ or ‘values’).

  • tree (lxml.etree.ElementTree) – (optional) Content of the file.

  • in_panel (bool) – (default=False) True if it is displayed in a panel.

Return type:

tuple

Returns:

A tuple such as (html, class, content_as_tree).

See: managers.xml.ManagerXml.view() and managers.xml.ManagerXml.edit()

The managers.cioset Module

A file manager for Cioset XML files.

cioxml2.managers.cioset.includeme(configurator: Configurator)[source]

Function to include WBWarehouse a manager.

Parameters:

configurator (pyramid.config.Configurator) – Object used to do configuration declaration within the application.

class cioxml2.managers.cioset.ManagerCioset[source]

Class to manage a Cioset XML file.

panel

alias of PanelCioset

The managers.cioarticle Module

A file manager for Cioarticle XML files.

cioxml2.managers.cioarticle.includeme(configurator: Configurator)[source]

Function to include a CioWarehouse2 manager.

Parameters:

configurator (pyramid.config.Configurator) – Object used to do configuration declaration within the application.

class cioxml2.managers.cioarticle.ManagerCioarticle[source]

Class to manage a Cioarticle XML file.

The managers.ciomemo Module

A file manager for Ciomemo XML files.

cioxml2.managers.ciomemo.includeme(configurator: Configurator)[source]

Function to include a CioWarehouse2 manager.

Parameters:

configurator (pyramid.config.Configurator) – Object used to do configuration declaration within the application.

class cioxml2.managers.ciomemo.ManagerCiomemo[source]

Class to manage a Ciomemo XML file.

The managers.ciorecipe Module

A file manager for Ciorecipe XML files.

cioxml2.managers.ciorecipe.includeme(configurator: Configurator)[source]

Function to include a CioWarehouse2 manager.

Parameters:

configurator (pyramid.config.Configurator) – Object used to do configuration declaration within the application.

class cioxml2.managers.ciorecipe.ManagerCiorecipe[source]

Class to manage a Ciorecipe XML file.