trac.prefs.api
– Trac Administration panels¶
Primary interface for managing preference panels (tabs).
Interfaces¶
-
class
trac.prefs.api.
IPreferencePanelProvider
¶ Bases:
trac.core.Interface
Provides panels for managing user preferences.
See also trac.prefs.api.IPreferencePanelProvider extension point
-
get_preference_panels
(req)¶ Return a list of available preference panels.
The items returned by this function must be tuple of the form
(panel, label)
, or(panel, label, parent_panel)
for child panels.
-
render_preference_panel
(req, panel)¶ Process a request for a preference panel.
This function should return a tuple of the form
(template, data)
, wheretemplate
is the name of the template to use anddata
is the data used when rendering the template.Note
When a plugin wants to use a legacy Genshi template instead of a Jinja2 template, it needs to return instead a triple of the form
(template, data, None)
, similar to whatIRequestHandler.process_request
does.
-