Skip to content

Commit

Permalink
edit
Browse files Browse the repository at this point in the history
  • Loading branch information
Bibby authored and anandology committed Jan 5, 2011
1 parent 8d3945e commit 79ca23e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cookbook/template_jinja.md
Expand Up @@ -30,7 +30,7 @@ You need to install both Jinja2 and webpy(0.3) first, and then try out the follo

# Used for Jinja2 i18n extension.
#lang = gettext.translation('domain', 'localedir', languages=['zh_CN'])
#render._lookup.install_gettext_translations(default_lang)
#render._lookup.install_gettext_translations(lang)

class hello:
def GET(self, name):
Expand All @@ -40,5 +40,9 @@ You need to install both Jinja2 and webpy(0.3) first, and then try out the follo
app.run()

### Template file: templates/hello.html

Hello, {{ name }}.

For i18n string:

{{ _('Hello') }}, {{ name }}.

0 comments on commit 79ca23e

Please sign in to comment.