Changes between Version 3 and Version 4 of TracDev/Proposals/Jinja
- Timestamp:
- Feb 8, 2015, 1:13:27 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracDev/Proposals/Jinja
v3 v4 1 1 = Add Support for the Jinja2 Template Engine 2 2 3 We've decided some time ago to remove support for the ClearSilver template engine, in 0.12, but this didn't happen yet. Clearsilver had its share of inconveniences, enough that we decided to switch to the nicer Genshi template enginein 0.12, but it was **very** fast and memory lenient. While we managed to keep Genshi memory usage somewhat in control (remember #6614), the speed was never really adequate, especially for big changesets and for displaying source files over a few thousand lines of code (see TracDev/Performance#Genshi for details).3 We've decided some time ago to remove support for the ClearSilver template engine, in Trac 0.12, but this didn't happen yet. Clearsilver had its share of inconveniences, enough that we decided to switch to the nicer [http://genshi.edgewall.org/ Genshi template engine] in 0.12, but it was **very** fast and memory lenient. While we managed to keep Genshi memory usage somewhat in control (remember #6614), the speed was never really adequate, especially for big changesets and for displaying source files over a few thousand lines of code (see TracDev/Performance#Genshi for details). 4 4 5 5 So one solution would be to switch once again, to a template engine that would combine the advantages of Genshi (pure Python, nice templates, flexible) and ClearSilver (speed!). Such a beast seems to exist now: **[http://jinja.pocoo.org/2/documentation/ Jinja2]**. 6 6 7 The switch can happen progressively , instead of removing support for ClearSilver we could substitute that code by the support for Jinja2 (well, maybe, remains to be seen if that still makes sense while coding it).7 The switch can happen progressively: instead of removing support for ClearSilver we could substitute that code by the support for Jinja2. 8 8 9 Several points remain to be clarified: what will be the upgrade path for plugins that came to rely on `IStreamFilter`s, how to handle themeing, should we rewrite tag builders or use lightweight string templates, etc. 9 Several points remain to be clarified: 10 * what will be the upgrade path for plugins that came to rely on `IStreamFilter`s? 11 * how to handle themeing? 12 * should we rewrite tag builders or use lightweight string templates? 13 * others? 10 14 11 15 See also: googlegroups:trac-dev:fc8d8c0447140110 … … 13 17 == Status 14 18 15 Nothing started yet, and the urgency has dropped now that we have a good Genshi 0.6 release available19 Nothing started yet, and the urgency has dropped now that we have a good [http://genshi.edgewall.org/milestone/0.6 Genshi 0.6 release] available. 16 20 17 21 == Other projects looking at Jinja2 18 22 19 Cobbler - looking at a move from cheetah https-fedorahosted.org/pipermail/cobbler/2010-December/006037.html 23 [http://www.cobblerd.org/ Cobbler] - looking at [http://www.cobblerd.org/manuals/2.6.0/4/6_-_Alternative_Template_Formats.html a move from cheetah to jinja2].