Edgewall Software

Changes between Version 45 and Version 46 of TracDev/PortingFromGenshiToJinja


Ignore:
Timestamp:
Feb 2, 2017, 12:30:40 AM (7 years ago)
Author:
Christian Boos
Comment:

add a section for #PanelProviders

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/PortingFromGenshiToJinja

    v45 v46  
    150150
    151151
     152=== Implementing `IAdminPanelProvider` and `IPreferencePanelProvider` #PanelProviders
     153
     154Plugins which implement custom admin or preference panels must follow the same conventions  in `render_admin_panel` and `render_preference_panel` as the ones explained above for [#IRequestHandler IRequestHandler.process_request]:
     155 - a return value of `(template, data)` means that `template` is the name of a Jinja2 template
     156 - a return value of `(template, data, None)` means that `template` in this case is the name of a Genshi template
     157
     158The only "problem" is that in this specific case, the legacy API for the return value was also `(template, data)`. So in this case, the return value needs to be changed if the template remains a Genshi template.
     159
     160See for example [TH16217] (TH:FullBlogPlugin) and below in [#i18n] (SpamFilter).
    152161
    153162=== Generating content