Changes between Version 14 and Version 15 of TracDev/Proposals/Jinja
- Timestamp:
- Feb 23, 2016, 12:30:44 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracDev/Proposals/Jinja
v14 v15 1 [[PageOutline(2-3)]] 1 2 = Add Support for the Jinja2 Template Engine 2 3 … … 10 11 - 127/898 plugins (14.1%) on trac-hacks.org use `filter_stream()` 11 12 - see [PortingFromGenshiToJinja#ReplacingITemplateStreamFilter replacing ITemplateStreamFilter] 12 * how to handle themeing? see [#Themeing] 13 * should we rewrite tag builders or use lightweight string templates? -> `tag``Fragment`/`Element` builder has been replaced, and is backward compatible13 * how to handle themeing? see [#Themeing] below 14 * should we rewrite tag builders or use lightweight string templates? -> [PortingFromGenshiToJinja#tag tag] `Fragment`/`Element` builder has been replaced, and is backward compatible 14 15 * others? 15 16 … … 65 66 66 67 === Themeing 68 69 We summarize the current template page architecture we use since the adoption of the Genshi template engine (i.e. since Trac 0.11), before describing the new but similar template page architecture that we'll use with the Jinja2 template engine. 70 67 71 ==== Genshi theme 68 72 I've never really tried the TH:ThemeEnginePlugin plugin, or alternatives, so I can't be sure if I got it right, but from what I can see in Trac's code base itself, the idea with Genshi-based themeing (and page architecture in general) was to have a dynamically loaded "theme" template page that would primarily be in charge of the main structure of all HTML pages. … … 378 382 379 383 == Genshi to Jinja2 Migration 384 385 Some systematic comparison of the Genshi and Jinja2 template syntax can be seen in PortingFromGenshiToJinja#Changesinthetemplatesyntax (modeled after the old PortingFromClearSilverToGenshi page). 380 386 381 387 === Conversion example