Skip to content
Myr

[svn] small baker changes

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 9a32e49 · Browse files · 2 files+15 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+15 added−2 removed

  • other:+15 added−2 removed

2 files+15 added−2 removed

modified:docs/src/frameworks.txt+11 added
36 unmodified lines
37 'jinja.environment': ...,38 'jinja.extension': 'tmpl'39 })4041Note that you have to use a trailing slash to load templates if you want to42specify the extension. Otherwise use the dotted notation:4344.. sourcecode:: python4546 render_template('/index.html')47 render_template('index')48 49 render_template('/modules/userlist.html')50 render_template('modules.userlist')515253TurboGears54----------5556Integrating Jinja into TurboGears works pretty much the same.
31 unmodified lines
modified:jinja/bakerplugin.py+4 added-2 removed
46 unmodified lines
47 if template_string is not None:48 return self.environment.from_string(template_string)4950 # Translate TG dot notation to normal / template path51 if '/' not in templatename and '.' in templatename:52 templatename = '/' + templatename.replace('.', '/') + '.' + self.extension51 if templatename.startswith('/'):52 templatename = templatename[1:]53 else:54 templatename = templatename.replace('.', '/') + '.' + self.extension5556 return self.environment.get_template(templatename)5758 def render(self, info, format='html', fragment=False, template=None):
10 unmodified lines