pyalchemybiz/data/templates/customer.mako.py
Jan Dittberner 554276ed23 initial Pylons code (fixes #3)
git-svn-id: file:///var/www/wwwusers/usr01/svn/pyalchemybiz/trunk@5 389c73d4-bf09-4d3d-a15e-f94a37d0667a
2008-10-05 15:23:54 +00:00

51 lines
1.7 KiB
Python

from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 4
_modified_time = 1223072023.421654
_template_filename='/home/jan/src/pyalchemybiz/pyalchemybiz/templates/customer.mako'
_template_uri='/customer.mako'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding=None
_exports = []
def _mako_get_namespace(context, name):
try:
return context.namespaces[(__name__, name)]
except KeyError:
_mako_generate_namespaces(context)
return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
pass
def _mako_inherit(template, context):
_mako_generate_namespaces(context)
return runtime._inherit_from(context, u'base.mako', _template_uri)
def render_body(context,**pageargs):
context.caller_stack._push_frame()
try:
__M_locals = __M_dict_builtin(pageargs=pageargs)
h = context.get('h', UNDEFINED)
c = context.get('c', UNDEFINED)
__M_writer = context.writer()
# SOURCE LINE 1
__M_writer(u'\n\n<h1>Hallo</h1>\n\n<ul id="customers">\n')
# SOURCE LINE 6
for customer in c.customers:
# SOURCE LINE 7
__M_writer(u' <li>')
__M_writer(unicode(customer.firstname))
__M_writer(u'&nbsp;')
__M_writer(unicode(customer.lastname))
__M_writer(u' [')
__M_writer(unicode(h.link_to('edit', h.url_for(id=customer.id, action="edit"))))
__M_writer(u']</li>\n')
# SOURCE LINE 9
__M_writer(u'</ul>\n')
return ''
finally:
context.caller_stack._pop_frame()