Configuring the user interface#

Relation tags#

A RelationTag object is an object which allows to link a configuration information to a relation definition. For instance, the standard primary view uses a RelationTag object (uicfg.primaryview_section) to get the section to display relations.

# display ``entry_of`` relations in the ``relations`` section in the ``BlogEntry`` primary view
uicfg.primaryview_section.tag_subject_of(('BlogEntry', 'entry_of', '*'),

# hide every relation ``entry_of`` in the ``Blog`` primary view
uicfg.primaryview_section.tag_object_of(('*', 'entry_of', 'Blog'), 'hidden')
Three primitives are defined:
  • tag_subject_of tag a relation in the subject’s context

  • tag_object_of tag a relation in the object’s context

  • tag_attribute shortcut for tag_subject_of

The uicfg module#


The part of uicfg that deals with primary views is in the Primary view configuration chapter.

The uihelper module#