Edgewall Software

Changes between Version 19 and Version 20 of TracTroubleshooting


Ignore:
Timestamp:
Mar 23, 2017, 2:23:11 AM (7 years ago)
Author:
Ryan J Ollos
Comment:

Revise for Genshi and Jinja2.

Legend:

Unmodified
Added
Removed
Modified
  • TracTroubleshooting

    v19 v20  
    5555==== Inspecting the Template data
    5656
    57 ===== Clearsilver's HDF
     57The template data dictionary can be inspected by appending`?hdfdump=1` to the URL, or `&hdfdump=1`, in case other parameters are already present in the URL. The acronym `hdf` is a holdover from before Trac 0.11, when ClearSilver was used with its so-called ''Hierarchical Data Format''.
    5858
    59 Before [milestone:0.11], Trac was using ClearSilver as its template engine.
    60 Clearsilver uses a so-called ''Hierarchical Data Format'' which is prepared by the controller.
    61 To inspect this ''HDF'', a simple trick is to append to the URL the `?hdfdump=1` string or `&hdfdump=1`, in case other parameters are already present in the URL.
    62 
    63 ===== Genshi data dictionary
    64 
    65 Starting with [milestone:0.11], Trac uses the [http://genshi.edgewall.org Genshi] template engine.
    66 As this template engine is also written in Python, no specific data format is needed and a simple Python dictionary is used to feed the engine. It's very easy to inspect any part of this data by modifying the template and inserting `${pprint(...)}` statements, possibly in between `<pre>...</pre>` tags.
    67 Each modification to a template will be detected on the fly and you'll be able to see the result of the change immediately, provided you have the following setup in your TracIni:
     59Starting with [milestone:0.11], Trac uses the [http://genshi.edgewall.org Genshi] template engine, and starting with [milestone:1.3.2] Trac uses [wiki:TracDev/Proposals/Jinja Jinja2].
     60As the template engines are written in Python, no specific data format is needed and a simple Python dictionary is used to feed the engine. It's very easy to inspect any part of this data by modifying the template and inserting `${pprint(...)}` statements, possibly in between `<pre>...</pre>` tags.
     61Each modification to a template will be detected on the fly and you'll be able to see the result of the change immediately, provided you have the following [TracIni#trac-auto_reload-option configuration]:
    6862{{{#!ini
    6963[trac]