initial Pylons code (fixes #3)

git-svn-id: file:///var/www/wwwusers/usr01/svn/pyalchemybiz/trunk@5 389c73d4-bf09-4d3d-a15e-f94a37d0667a
This commit is contained in:
Jan Dittberner 2008-10-05 15:23:54 +00:00
parent 38d4c952cf
commit 554276ed23
42 changed files with 930 additions and 47 deletions

View file

@ -0,0 +1,45 @@
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 4
_modified_time = 1223071301.6449161
_template_filename=u'/home/jan/src/pyalchemybiz/pyalchemybiz/templates/base.mako'
_template_uri=u'/base.mako'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding=None
_exports = []
def render_body(context,**pageargs):
context.caller_stack._push_frame()
try:
__M_locals = __M_dict_builtin(pageargs=pageargs)
h = context.get('h', UNDEFINED)
next = context.get('next', UNDEFINED)
__M_writer = context.writer()
# SOURCE LINE 1
__M_writer(u'<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN"\n "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n<html>\n <head>\n <title>PyAlchemyBiz</title>\n ')
# SOURCE LINE 6
__M_writer(unicode(h.stylesheet_link_tag('/pyalchemybiz.css')))
__M_writer(u'\n ')
# SOURCE LINE 7
__M_writer(unicode(h.javascript_include_tag(
'/javascripts/pyalchemybiz.js', builtins=True)))
# SOURCE LINE 8
__M_writer(u'\n </head>\n <body>\n <div class="content">\n ')
# SOURCE LINE 12
__M_writer(unicode(next.body()))
__M_writer(u'')
# SOURCE LINE 13
__M_writer(u' <p class="footer">\n Return to the\n ')
# SOURCE LINE 15
__M_writer(unicode(h.link_to('FrontPage',
h.url_for(action="index"))))
# SOURCE LINE 16
__M_writer(u'\n </p>\n </div>\n </body>\n</html>\n')
return ''
finally:
context.caller_stack._pop_frame()

View file

@ -0,0 +1,50 @@
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()