~jonas-drange/ubuntu-start-page/1252899-mobile-friendly

« back to all changes in this revision

Viewing changes to src/Mako-0.1.9/examples/bench/django/templatetags/bench.py

  • Committer: Matthew Nuzum
  • Date: 2008-04-18 01:58:53 UTC
  • Revision ID: matthew.nuzum@canonical.com-20080418015853-2b8rf979z2c2exxl
adding files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from django.template import Library, Node, resolve_variable
 
2
from django.utils.html import escape
 
3
 
 
4
register = Library()
 
5
 
 
6
def greeting(name):
 
7
    return 'Hello, %s!' % escape(name)
 
8
greeting = register.simple_tag(greeting)