#2395: Mako bytecode caching only works when use_dotted_templatenames = False
----------------------------+-----------------------------------------------
Reporter: seedifferently | Owner: lmacken
Type: defect | Status: reopened
Priority: high | Milestone: 2.1b2
Component: TurboGears | Version: trunk
Severity: normal | Resolution:
Keywords: |
----------------------------+-----------------------------------------------
Changes (by lmacken):
* cc: percious (added)
* status: closed => reopened
* resolution: fixed =>
Comment:
Reopening, since I'm not 100% satisfied with how this works by default.
Right now out of the box (with this patch) `use_dotted_templatenames` is
enabled and Mako stores your compiled bytecode in
`myproject/templates/the/full/path/to/myproject/templates/index.pyc`.
This behavior is documented by Mako
(http://www.makotemplates.org/docs/usage.html#usage_file).
`templating.mako.compiled_templates_dir` defaults to your templates
directory, and when `use_dotted_templatenames` is disabled Mako compiles
and stores templates alongside the existing templates.
I don't know if we can easily have the same behavior with and without
dotted templatenames, but I think we could do a better job of docmenting
this and making it easy to change, without polluting the project's
templates directory.
So, how about we add something like this in the default ini?
{{{
{{if mako}}
# The location to store your compiled templates
templating.mako.compiled_templates_dir = %(here)/data/templates
{{endif}}
}}}
This way, we're sharing %(here)/data with Beaker sessions and we're not
touching the projects templates directory.
--
Ticket URL: <http://trac.turbogears.org/ticket/2395#comment:7>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en