Opened 4 years ago
Closed 13 months ago
#13876 closed enhancement (fixed)
[PATCH] Support Jinja2 Templates
Reported by: | anonymous | Owned by: | Dirk Stöcker |
---|---|---|---|
Priority: | normal | Component: | TracIniAdminPanelPlugin |
Severity: | normal | Keywords: | patch |
Cc: | Trac Release: | 1.4 |
Description
I was interested in this plugin, so I tried to convert it to Jinja. I am getting so many requests for Trac changes that it seemed like using this plugin might be a good idea.
I haven't used it before, so I may not be familiar with everything it does. However, basic functions seem OK-ish. At least this is something someone else with more knowledge could take forward.
I don't know how to do the internationalization, so I totally left that out of the new template.
There is a bunch of pre-processing of the data structures in web_ui.py
to make up for the list comprehensions used in Genshi. It seems those don't translate to Jinja2. I didn't test that part of the code extensively, and I don't know what kind of oddities could be introduced if it weren't entirely correct. See the code where the comment is: "Pre-process lists for the (Jinja) template
"
One general thing I don't quite understand ... I have two inherited files in one of my projects, and you would think the second file would take precedence, but this plugin shows the value from the first one. (e.g. authz_module_name) if it exists in both. However, I don't believe that's an artifact of the Jinja port.
Attachments (1)
Change History (2)
Changed 4 years ago by
Attachment: | traciniadminpanelplugin_jinja_templates.patch added |
---|
comment:1 Changed 13 months ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Aaargh. Never got the mail. Now I converted it myself for 1.6.
Patch for use of Jinja templates.