Cannot use Mako templates not ending in '.html'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
web.py |
Confirmed
|
Low
|
Anand Chitipothu |
Bug Description
When using web.contrib.
In my specific application, I need to use templates which have no extension in their filename.
Ideally, a feature such as "assume .html extension" would exist in Mako proper (as a filename_extension option on the TemplateLookup constructor, perhaps,) so that inheritance would also assume the default extension (so you don't have to use "overview" within web.py but "overview.html" within the template files themselves.) I plan to throw this idea at the Mako team.
If the above feature is integrated into Mako, the _extension option should still exist within web.py so that when a user opts to specify the filename extension in every invocation (i.e. call TemplateLookup with filename_
I have attached a patch against an April 2008 devel version which adds an _extension option to the render_mako constructor, as well as a self-explanatory example in the docstring.
Changed in webpy: | |
assignee: | nobody → anandology |
importance: | Undecided → Low |
milestone: | none → 0.3 |
status: | New → Confirmed |
Changed in webpy: | |
milestone: | 0.3 → 0.35 |
What if there are templates with different extensions?