#13874 closed enhancement (fixed)
[PATCH] Support Jinja2 Templates
Reported by: | anonymous | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | ExportImportXlsPlugin |
Severity: | normal | Keywords: | patch |
Cc: | Trac Release: | 1.4 |
Description
I was looking for a plugin to add tickets for an organizational process that is repeated regularly and has a lot of tasks. I decided this plugin looked like it would be good for that purpose.
This plugin seems to work fine for our use case, but if possible I want to use all plugins that are not obsolete by requiring Genshi, so I ported it to use Jinja2. Sorry, I'm not an expert, but so far it seems to work. There could probably be some amount of simplification that would make it more readable.
See the attached patch. I'm using Trac 1.4.2.
Attachments (1)
Change History (5)
Changed 21 months ago by
Attachment: | exportimportxlsplugin_jinja_templates.patch added |
---|
comment:1 Changed 21 months ago by
Owner: | changed from ben_12 to Ryan J Ollos |
---|---|
Status: | new → accepted |
comment:3 Changed 21 months ago by
Thanks. I learned something. As seen in your patch hasattr(Chrome, 'jenv')
is sufficient and hasattr(Chrome(self.env), 'jenv')
, that I had used on many occasions, unnecessarily instantiates an object.
comment:4 Changed 21 months ago by
Keen observation on your part! But not so much on mine, as that snippet already existed in this plugin. So we'll have to thank the author of the previous change, and maybe I'll need to go back and update the other plugins I'm using. At least in my local copies. lol
The Jinja2 template patch for ExportImportXlsPlugin