mirror of
https://github.com/wassname/pyramid_formalchemy.git
synced 2026-06-27 16:10:40 +08:00
assume all .pt are compiled
This commit is contained in:
@@ -11,7 +11,6 @@ docs/modules/
|
||||
include/
|
||||
.installed.cfg
|
||||
*.egg-info
|
||||
*.pt.py
|
||||
*.swp
|
||||
*.pyc
|
||||
*.pyo
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include CHANGES.txt
|
||||
recursive-include pyramid_formalchemy *.pt.py
|
||||
recursive-include pyramid_formalchemy *.pt
|
||||
recursive-include pyramid_formalchemy *.css
|
||||
recursive-include pyramid_formalchemy *.js
|
||||
recursive-include pyramid_formalchemy *.gif
|
||||
recursive-include pyramid_formalchemy *.png
|
||||
recursive-include pyramid_formalchemy *.jpg
|
||||
@@ -0,0 +1,77 @@
|
||||
registry = dict(version=0)
|
||||
def bind():
|
||||
from cPickle import loads as _loads
|
||||
_lookup_attr = _loads('cchameleon.core.codegen\nlookup_attr\np1\n.')
|
||||
_init_scope = _loads('cchameleon.core.utils\necontext\np1\n.')
|
||||
_attrs_4357189584 = _loads('(dp1\nVaction\np2\nV\nsVmethod\np3\nVPOST\np4\nsVenctype\np5\nVmultipart/form-data\np6\ns.')
|
||||
_attrs_4357187280 = _loads('(dp1\n.')
|
||||
_init_stream = _loads('cchameleon.core.generation\ninitialize_stream\np1\n.')
|
||||
_init_default = _loads('cchameleon.core.generation\ninitialize_default\np1\n.')
|
||||
_attrs_4357189392 = _loads('(dp1\n.')
|
||||
_attrs_4357187728 = _loads('(dp1\nVname\np2\nV_method\np3\nsVtype\np4\nVhidden\np5\nsVvalue\np6\nVPUT\np7\ns.')
|
||||
_init_tal = _loads('cchameleon.core.generation\ninitialize_tal\np1\n.')
|
||||
def render(econtext, rcontext=None):
|
||||
macros = econtext.get('macros')
|
||||
_translate = econtext.get('_translate')
|
||||
_slots = econtext.get('_slots')
|
||||
target_language = econtext.get('target_language')
|
||||
u'_init_stream()'
|
||||
(_out, _write, ) = _init_stream()
|
||||
u'_init_tal()'
|
||||
(_attributes, repeat, ) = _init_tal()
|
||||
u'_init_default()'
|
||||
_default = _init_default()
|
||||
u'None'
|
||||
default = None
|
||||
u'None'
|
||||
_domain = None
|
||||
u"main.macros['master']"
|
||||
_metal = _lookup_attr(econtext['main'], 'macros')['master']
|
||||
def _callback_main(econtext, _repeat, _out=_out, _write=_write, _domain=_domain, **_ignored):
|
||||
if _repeat:
|
||||
repeat.update(_repeat)
|
||||
attrs = _attrs_4357189392
|
||||
_write(u'<div>\n ')
|
||||
attrs = _attrs_4357189584
|
||||
u"''"
|
||||
_write(u'<form action="" method="POST" enctype="multipart/form-data">\n ')
|
||||
_default.value = default = ''
|
||||
u'fs.render()'
|
||||
_content = _lookup_attr(econtext['fs'], 'render')()
|
||||
attrs = _attrs_4357187280
|
||||
u'_content'
|
||||
_write(u'<div>')
|
||||
_tmp1 = _content
|
||||
_tmp = _tmp1
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
_write(_tmp)
|
||||
_write(u'</div>\n ')
|
||||
attrs = _attrs_4357187728
|
||||
u"main.macros['buttons']"
|
||||
_write(u'<input type="hidden" name="_method" value="PUT" />\n ')
|
||||
_metal = _lookup_attr(econtext['main'], 'macros')['buttons']
|
||||
u'{}'
|
||||
_tmp = {}
|
||||
u"main.macros['buttons']"
|
||||
_metal.render(_tmp, _out=_out, _write=_write, _domain=_domain, econtext=econtext)
|
||||
_write(u'\n </form>\n </div>\n')
|
||||
u"{'main': _callback_main}"
|
||||
_tmp = {'main': _callback_main, }
|
||||
u"main.macros['master']"
|
||||
_metal.render(_tmp, _out=_out, _write=_write, _domain=_domain, econtext=econtext)
|
||||
return _out.getvalue()
|
||||
return render
|
||||
|
||||
__filename__ = u'/Users/gawel/py/formalchemy_project/pyramid_formalchemy/pyramid_formalchemy/templates/admin/edit.pt'
|
||||
registry[(None, True, '1488bdb950901f8f258549439ef6661a49aae984')] = bind()
|
||||
@@ -0,0 +1,173 @@
|
||||
registry = dict(version=0)
|
||||
def bind():
|
||||
from cPickle import loads as _loads
|
||||
_lookup_attr = _loads('cchameleon.core.codegen\nlookup_attr\np1\n.')
|
||||
_attrs_4347680016 = _loads('(dp1\nVclass\np2\nVlayout-grid\np3\ns.')
|
||||
_init_scope = _loads('cchameleon.core.utils\necontext\np1\n.')
|
||||
_re_amp = _loads("cre\n_compile\np1\n(S'&(?!([A-Za-z]+|#[0-9]+);)'\np2\nI0\ntRp3\n.")
|
||||
_attrs_4347717136 = _loads('(dp1\nVclass\np2\nVui-widget-header ui-widget-link ui-corner-all\np3\ns.')
|
||||
_attrs_4347680400 = _loads('(dp1\nVclass\np2\nVui-pager\np3\ns.')
|
||||
_attrs_4347680656 = _loads('(dp1\n.')
|
||||
_attrs_4347717200 = _loads('(dp1\nVclass\np2\nVui-icon ui-icon-circle-plus\np3\ns.')
|
||||
_init_stream = _loads('cchameleon.core.generation\ninitialize_stream\np1\n.')
|
||||
_init_default = _loads('cchameleon.core.generation\ninitialize_default\np1\n.')
|
||||
_attrs_4347680528 = _loads('(dp1\n.')
|
||||
_init_tal = _loads('cchameleon.core.generation\ninitialize_tal\np1\n.')
|
||||
def render(econtext, rcontext=None):
|
||||
macros = econtext.get('macros')
|
||||
_translate = econtext.get('_translate')
|
||||
_slots = econtext.get('_slots')
|
||||
target_language = econtext.get('target_language')
|
||||
u'_init_stream()'
|
||||
(_out, _write, ) = _init_stream()
|
||||
u'_init_tal()'
|
||||
(_attributes, repeat, ) = _init_tal()
|
||||
u'_init_default()'
|
||||
_default = _init_default()
|
||||
u'None'
|
||||
default = None
|
||||
u'None'
|
||||
_domain = None
|
||||
u"main.macros['master']"
|
||||
_metal = _lookup_attr(econtext['main'], 'macros')['master']
|
||||
def _callback_main(econtext, _repeat, _out=_out, _write=_write, _domain=_domain, **_ignored):
|
||||
if _repeat:
|
||||
repeat.update(_repeat)
|
||||
attrs = _attrs_4347680656
|
||||
u"''"
|
||||
_write(u'<div>\n ')
|
||||
_default.value = default = ''
|
||||
u'pager'
|
||||
_content = econtext['pager']
|
||||
attrs = _attrs_4347680400
|
||||
u'_content'
|
||||
_write(u'<div class="ui-pager">')
|
||||
_tmp1 = _content
|
||||
_tmp = _tmp1
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
_write(_tmp)
|
||||
u"''"
|
||||
_write(u'</div>\n ')
|
||||
_default.value = default = ''
|
||||
u'fs.render()'
|
||||
_content = _lookup_attr(econtext['fs'], 'render')()
|
||||
attrs = _attrs_4347680016
|
||||
u'_content'
|
||||
_write(u'<table class="layout-grid">')
|
||||
_tmp1 = _content
|
||||
_tmp = _tmp1
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
_write(_tmp)
|
||||
_write(u'</table>\n ')
|
||||
attrs = _attrs_4347680528
|
||||
_write(u'<p>\n ')
|
||||
attrs = _attrs_4347717136
|
||||
u"request.route_url(request.route_name, traverse='%s/new' % request.model_name)"
|
||||
_write(u'<a class="ui-widget-header ui-widget-link ui-corner-all"')
|
||||
_tmp1 = _lookup_attr(econtext['request'], 'route_url')(_lookup_attr(econtext['request'], 'route_name'), traverse=('%s/new' % _lookup_attr(econtext['request'], 'model_name')))
|
||||
if (_tmp1 is _default):
|
||||
_tmp1 = None
|
||||
if ((_tmp1 is not None) and (_tmp1 is not False)):
|
||||
if (_tmp1.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp1 = unicode(_translate(_tmp1, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp1, unicode):
|
||||
_tmp1 = str(_tmp1)
|
||||
if ('&' in _tmp1):
|
||||
if (';' in _tmp1):
|
||||
_tmp1 = _re_amp.sub('&', _tmp1)
|
||||
else:
|
||||
_tmp1 = _tmp1.replace('&', '&')
|
||||
if ('<' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('<', '<')
|
||||
if ('>' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('>', '>')
|
||||
if ('"' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('"', '"')
|
||||
_write(((' href="' + _tmp1) + '"'))
|
||||
_write(u'>\n ')
|
||||
attrs = _attrs_4347717200
|
||||
u"F_('New')"
|
||||
_write(u'<span class="ui-icon ui-icon-circle-plus"></span>\n ')
|
||||
_tmp1 = econtext['F_']('New')
|
||||
_tmp = _tmp1
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
u'model_name'
|
||||
_write(u' ')
|
||||
_tmp1 = econtext['model_name']
|
||||
_tmp = _tmp1
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'\n </a>\n </p>\n </div>\n')
|
||||
u"{'main': _callback_main}"
|
||||
_tmp = {'main': _callback_main, }
|
||||
u"main.macros['master']"
|
||||
_metal.render(_tmp, _out=_out, _write=_write, _domain=_domain, econtext=econtext)
|
||||
return _out.getvalue()
|
||||
return render
|
||||
|
||||
__filename__ = '/Users/gawel/py/formalchemy_project/pyramid_formalchemy/pyramid_formalchemy/templates/admin/listing.pt'
|
||||
registry[(None, True, '1488bdb950901f8f258549439ef6661a49aae984')] = bind()
|
||||
@@ -0,0 +1,368 @@
|
||||
registry = dict(version=0)
|
||||
def bind():
|
||||
from cPickle import loads as _loads
|
||||
_lookup_attr = _loads('cchameleon.core.codegen\nlookup_attr\np1\n.')
|
||||
_attrs_4349228944 = _loads('(dp1\n.')
|
||||
_init_scope = _loads('cchameleon.core.utils\necontext\np1\n.')
|
||||
_re_amp = _loads("cre\n_compile\np1\n(S'&(?!([A-Za-z]+|#[0-9]+);)'\np2\nI0\ntRp3\n.")
|
||||
_attrs_4349229648 = _loads('(dp1\n.')
|
||||
_attrs_4349229712 = _loads('(dp1\nVclass\np2\nVbreadcrumb\np3\ns.')
|
||||
_attrs_4349229392 = _loads('(dp1\n.')
|
||||
_attrs_4349229776 = _loads('(dp1\n.')
|
||||
_attrs_4349230160 = _loads('(dp1\n.')
|
||||
_attrs_4349229520 = _loads('(dp1\nVrel\np2\nVstylesheet\np3\ns.')
|
||||
_init_stream = _loads('cchameleon.core.generation\ninitialize_stream\np1\n.')
|
||||
_attrs_4349229072 = _loads('(dp1\n.')
|
||||
_attrs_4349229584 = _loads('(dp1\nVid\np2\nVheader\np3\nsVclass\np4\nVui-widget-header ui-corner-all\np5\ns.')
|
||||
_init_default = _loads('cchameleon.core.generation\ninitialize_default\np1\n.')
|
||||
_attrs_4349229968 = _loads('(dp1\nVid\np2\nVcontent\np3\nsVclass\np4\nVui-admin ui-widget\np5\ns.')
|
||||
_attrs_4349229264 = _loads('(dp1\n.')
|
||||
_init_tal = _loads('cchameleon.core.generation\ninitialize_tal\np1\n.')
|
||||
_attrs_4349230480 = _loads('(dp1\n.')
|
||||
def render(econtext, rcontext=None):
|
||||
macros = econtext.get('macros')
|
||||
_translate = econtext.get('_translate')
|
||||
_slots = econtext.get('_slots')
|
||||
target_language = econtext.get('target_language')
|
||||
u"%(scope)s['%(out)s'], %(scope)s['%(write)s']"
|
||||
(_out, _write, ) = (econtext['_out'], econtext['_write'], )
|
||||
u'_init_tal()'
|
||||
(_attributes, repeat, ) = _init_tal()
|
||||
u'_init_default()'
|
||||
_default = _init_default()
|
||||
u'None'
|
||||
default = None
|
||||
u'None'
|
||||
_domain = None
|
||||
attrs = _attrs_4349228944
|
||||
_write(u'<html>\n ')
|
||||
attrs = _attrs_4349229072
|
||||
u"''"
|
||||
_write(u'<head>\n ')
|
||||
_default.value = default = ''
|
||||
u"request.model_name or 'root'"
|
||||
_content = (_lookup_attr(econtext['request'], 'model_name') or 'root')
|
||||
attrs = _attrs_4349229392
|
||||
u'_content'
|
||||
_write(u'<title>')
|
||||
_tmp1 = _content
|
||||
_tmp = _tmp1
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'</title>\n ')
|
||||
attrs = _attrs_4349229520
|
||||
u"request.static_url('pyramid_formalchemy:static/admin.css')"
|
||||
_write(u'<link rel="stylesheet"')
|
||||
_tmp1 = _lookup_attr(econtext['request'], 'static_url')('pyramid_formalchemy:static/admin.css')
|
||||
if (_tmp1 is _default):
|
||||
_tmp1 = None
|
||||
if ((_tmp1 is not None) and (_tmp1 is not False)):
|
||||
if (_tmp1.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp1 = unicode(_translate(_tmp1, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp1, unicode):
|
||||
_tmp1 = str(_tmp1)
|
||||
if ('&' in _tmp1):
|
||||
if (';' in _tmp1):
|
||||
_tmp1 = _re_amp.sub('&', _tmp1)
|
||||
else:
|
||||
_tmp1 = _tmp1.replace('&', '&')
|
||||
if ('<' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('<', '<')
|
||||
if ('>' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('>', '>')
|
||||
if ('"' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('"', '"')
|
||||
_write(((' href="' + _tmp1) + '"'))
|
||||
_write(u'></link>\n </head>\n ')
|
||||
attrs = _attrs_4349229264
|
||||
_write(u'<body>\n ')
|
||||
attrs = _attrs_4349229968
|
||||
_write(u'<div id="content" class="ui-admin ui-widget">\n ')
|
||||
attrs = _attrs_4349229584
|
||||
_write(u'<h1 id="header" class="ui-widget-header ui-corner-all">\n ')
|
||||
attrs = _attrs_4349229712
|
||||
u'breadcrumb'
|
||||
_write(u'<div class="breadcrumb">\n ')
|
||||
_tmp1 = econtext['breadcrumb']
|
||||
item = None
|
||||
(_tmp1, _tmp2, ) = repeat.insert('item', _tmp1)
|
||||
for item in _tmp1:
|
||||
_tmp2 = (_tmp2 - 1)
|
||||
u"''"
|
||||
_write(u'')
|
||||
_default.value = default = ''
|
||||
u'item[1]'
|
||||
_content = item[1]
|
||||
attrs = _attrs_4349230480
|
||||
u'item[0]'
|
||||
_write(u'<a')
|
||||
_tmp3 = item[0]
|
||||
if (_tmp3 is _default):
|
||||
_tmp3 = None
|
||||
if ((_tmp3 is not None) and (_tmp3 is not False)):
|
||||
if (_tmp3.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp3 = unicode(_translate(_tmp3, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp3, unicode):
|
||||
_tmp3 = str(_tmp3)
|
||||
if ('&' in _tmp3):
|
||||
if (';' in _tmp3):
|
||||
_tmp3 = _re_amp.sub('&', _tmp3)
|
||||
else:
|
||||
_tmp3 = _tmp3.replace('&', '&')
|
||||
if ('<' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('<', '<')
|
||||
if ('>' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('>', '>')
|
||||
if ('"' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('"', '"')
|
||||
_write(((' href="' + _tmp3) + '"'))
|
||||
u'_content'
|
||||
_write('>')
|
||||
_tmp3 = _content
|
||||
_tmp = _tmp3
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
u'not repeat.item.end'
|
||||
_write(u'</a>\n ')
|
||||
_tmp3 = not _lookup_attr(repeat.item, 'end')
|
||||
if _tmp3:
|
||||
pass
|
||||
attrs = _attrs_4349230160
|
||||
_write(u'<span>/</span>')
|
||||
_write(u'\n ')
|
||||
if (_tmp2 == 0):
|
||||
break
|
||||
_write(' ')
|
||||
u"''"
|
||||
_write(u'\n </div>\n ')
|
||||
_default.value = default = ''
|
||||
u"request.model_name or 'root'"
|
||||
_content = (_lookup_attr(econtext['request'], 'model_name') or 'root')
|
||||
attrs = _attrs_4349229776
|
||||
u'_content'
|
||||
_write(u'<div>')
|
||||
_tmp1 = _content
|
||||
_tmp = _tmp1
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
u"%(slots)s.get(u'main')"
|
||||
_write(u'</div>\n </h1>\n ')
|
||||
_tmp = _slots.get(u'main')
|
||||
u'%(tmp)s is not None'
|
||||
_tmp1 = (_tmp is not None)
|
||||
if _tmp1:
|
||||
pass
|
||||
u'isinstance(%(tmp)s, basestring)'
|
||||
_tmp2 = isinstance(_tmp, basestring)
|
||||
if not _tmp2:
|
||||
pass
|
||||
econtext.update(dict(rcontext=rcontext, _domain=_domain))
|
||||
_tmp(econtext, repeat)
|
||||
else:
|
||||
pass
|
||||
u'%(tmp)s'
|
||||
_tmp2 = _tmp
|
||||
_tmp = _tmp2
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
_write(_tmp)
|
||||
else:
|
||||
pass
|
||||
attrs = _attrs_4349229648
|
||||
_write(u'<div>\n </div>')
|
||||
_write(u'\n </div>\n </body>\n</html>')
|
||||
return
|
||||
return render
|
||||
|
||||
__filename__ = '/Users/gawel/py/formalchemy_project/pyramid_formalchemy/pyramid_formalchemy/templates/admin/master.pt'
|
||||
registry[('master', False, '1488bdb950901f8f258549439ef6661a49aae984')] = bind()
|
||||
def bind():
|
||||
from cPickle import loads as _loads
|
||||
_lookup_attr = _loads('cchameleon.core.codegen\nlookup_attr\np1\n.')
|
||||
_init_scope = _loads('cchameleon.core.utils\necontext\np1\n.')
|
||||
_re_amp = _loads("cre\n_compile\np1\n(S'&(?!([A-Za-z]+|#[0-9]+);)'\np2\nI0\ntRp3\n.")
|
||||
_attrs_4351942800 = _loads('(dp1\n.')
|
||||
_init_stream = _loads('cchameleon.core.generation\ninitialize_stream\np1\n.')
|
||||
_attrs_4351944656 = _loads('(dp1\nVhref\np2\nV#\nsVclass\np3\nVui-widget-header ui-widget-link ui-widget-button ui-corner-all\np4\ns.')
|
||||
_init_default = _loads('cchameleon.core.generation\ninitialize_default\np1\n.')
|
||||
_attrs_4351944784 = _loads("(dp1\nVtype\np2\nVsubmit\np3\nsVvalue\np4\nV${F_('Save')}\np5\ns.")
|
||||
_attrs_4351945104 = _loads('(dp1\nVclass\np2\nVui-icon ui-icon-circle-arrow-w\np3\ns.')
|
||||
_attrs_4351943504 = _loads('(dp1\nVclass\np2\nVfa_field\np3\ns.')
|
||||
_init_tal = _loads('cchameleon.core.generation\ninitialize_tal\np1\n.')
|
||||
_attrs_4351944848 = _loads('(dp1\nVclass\np2\nVui-widget-header ui-widget-link ui-corner-all\np3\ns.')
|
||||
def render(econtext, rcontext=None):
|
||||
macros = econtext.get('macros')
|
||||
_translate = econtext.get('_translate')
|
||||
_slots = econtext.get('_slots')
|
||||
target_language = econtext.get('target_language')
|
||||
u"%(scope)s['%(out)s'], %(scope)s['%(write)s']"
|
||||
(_out, _write, ) = (econtext['_out'], econtext['_write'], )
|
||||
u'_init_tal()'
|
||||
(_attributes, repeat, ) = _init_tal()
|
||||
u'_init_default()'
|
||||
_default = _init_default()
|
||||
u'None'
|
||||
default = None
|
||||
u'None'
|
||||
_domain = None
|
||||
attrs = _attrs_4351942800
|
||||
_write(u'<div>\n ')
|
||||
attrs = _attrs_4351943504
|
||||
_write(u'<p class="fa_field">\n ')
|
||||
attrs = _attrs_4351944656
|
||||
_write(u'<a class="ui-widget-header ui-widget-link ui-widget-button ui-corner-all" href="#">\n ')
|
||||
attrs = _attrs_4351944784
|
||||
'join(value("F_(\'Save\')"),)'
|
||||
_write(u'<input type="submit"')
|
||||
_tmp1 = econtext['F_']('Save')
|
||||
if (_tmp1 is _default):
|
||||
_tmp1 = u"${F_('Save')}"
|
||||
if ((_tmp1 is not None) and (_tmp1 is not False)):
|
||||
if (_tmp1.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp1 = unicode(_translate(_tmp1, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp1, unicode):
|
||||
_tmp1 = str(_tmp1)
|
||||
if ('&' in _tmp1):
|
||||
if (';' in _tmp1):
|
||||
_tmp1 = _re_amp.sub('&', _tmp1)
|
||||
else:
|
||||
_tmp1 = _tmp1.replace('&', '&')
|
||||
if ('<' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('<', '<')
|
||||
if ('>' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('>', '>')
|
||||
if ('"' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('"', '"')
|
||||
_write(((' value="' + _tmp1) + '"'))
|
||||
_write(u' />\n </a>\n ')
|
||||
attrs = _attrs_4351944848
|
||||
u'request.route_url(request.route_name, traverse=request.model_name)'
|
||||
_write(u'<a class="ui-widget-header ui-widget-link ui-corner-all"')
|
||||
_tmp1 = _lookup_attr(econtext['request'], 'route_url')(_lookup_attr(econtext['request'], 'route_name'), traverse=_lookup_attr(econtext['request'], 'model_name'))
|
||||
if (_tmp1 is _default):
|
||||
_tmp1 = None
|
||||
if ((_tmp1 is not None) and (_tmp1 is not False)):
|
||||
if (_tmp1.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp1 = unicode(_translate(_tmp1, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp1, unicode):
|
||||
_tmp1 = str(_tmp1)
|
||||
if ('&' in _tmp1):
|
||||
if (';' in _tmp1):
|
||||
_tmp1 = _re_amp.sub('&', _tmp1)
|
||||
else:
|
||||
_tmp1 = _tmp1.replace('&', '&')
|
||||
if ('<' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('<', '<')
|
||||
if ('>' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('>', '>')
|
||||
if ('"' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('"', '"')
|
||||
_write(((' href="' + _tmp1) + '"'))
|
||||
_write(u'>\n ')
|
||||
attrs = _attrs_4351945104
|
||||
u"F_('Cancel')"
|
||||
_write(u'<span class="ui-icon ui-icon-circle-arrow-w"></span>\n ')
|
||||
_tmp1 = econtext['F_']('Cancel')
|
||||
_tmp = _tmp1
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'\n </a>\n </p>\n</div>')
|
||||
return
|
||||
return render
|
||||
|
||||
__filename__ = '/Users/gawel/py/formalchemy_project/pyramid_formalchemy/pyramid_formalchemy/templates/admin/master.pt'
|
||||
registry[('buttons', False, '1488bdb950901f8f258549439ef6661a49aae984')] = bind()
|
||||
@@ -0,0 +1,113 @@
|
||||
registry = dict(version=0)
|
||||
def bind():
|
||||
from cPickle import loads as _loads
|
||||
_lookup_attr = _loads('cchameleon.core.codegen\nlookup_attr\np1\n.')
|
||||
_init_scope = _loads('cchameleon.core.utils\necontext\np1\n.')
|
||||
_re_amp = _loads("cre\n_compile\np1\n(S'&(?!([A-Za-z]+|#[0-9]+);)'\np2\nI0\ntRp3\n.")
|
||||
_attrs_4349176784 = _loads('(dp1\n.')
|
||||
_init_stream = _loads('cchameleon.core.generation\ninitialize_stream\np1\n.')
|
||||
_attrs_4349176912 = _loads('(dp1\n.')
|
||||
_attrs_4349177040 = _loads('(dp1\n.')
|
||||
_attrs_4349177168 = _loads('(dp1\n.')
|
||||
_init_default = _loads('cchameleon.core.generation\ninitialize_default\np1\n.')
|
||||
_init_tal = _loads('cchameleon.core.generation\ninitialize_tal\np1\n.')
|
||||
def render(econtext, rcontext=None):
|
||||
macros = econtext.get('macros')
|
||||
_translate = econtext.get('_translate')
|
||||
_slots = econtext.get('_slots')
|
||||
target_language = econtext.get('target_language')
|
||||
u'_init_stream()'
|
||||
(_out, _write, ) = _init_stream()
|
||||
u'_init_tal()'
|
||||
(_attributes, repeat, ) = _init_tal()
|
||||
u'_init_default()'
|
||||
_default = _init_default()
|
||||
u'None'
|
||||
default = None
|
||||
u'None'
|
||||
_domain = None
|
||||
u"main.macros['master']"
|
||||
_metal = _lookup_attr(econtext['main'], 'macros')['master']
|
||||
def _callback_main(econtext, _repeat, _out=_out, _write=_write, _domain=_domain, **_ignored):
|
||||
if _repeat:
|
||||
repeat.update(_repeat)
|
||||
attrs = _attrs_4349176784
|
||||
u'models'
|
||||
_write(u'<div>\n ')
|
||||
_tmp1 = econtext['models']
|
||||
item = None
|
||||
(_tmp1, _tmp2, ) = repeat.insert('item', _tmp1)
|
||||
for item in _tmp1:
|
||||
_tmp2 = (_tmp2 - 1)
|
||||
attrs = _attrs_4349176912
|
||||
_write(u'<div>\n ')
|
||||
attrs = _attrs_4349177040
|
||||
u"''"
|
||||
_write(u'<div>\n ')
|
||||
_default.value = default = ''
|
||||
u'item'
|
||||
_content = item
|
||||
attrs = _attrs_4349177168
|
||||
u'request.route_url(request.route_name, traverse=item)'
|
||||
_write(u'<a')
|
||||
_tmp3 = _lookup_attr(econtext['request'], 'route_url')(_lookup_attr(econtext['request'], 'route_name'), traverse=item)
|
||||
if (_tmp3 is _default):
|
||||
_tmp3 = None
|
||||
if ((_tmp3 is not None) and (_tmp3 is not False)):
|
||||
if (_tmp3.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp3 = unicode(_translate(_tmp3, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp3, unicode):
|
||||
_tmp3 = str(_tmp3)
|
||||
if ('&' in _tmp3):
|
||||
if (';' in _tmp3):
|
||||
_tmp3 = _re_amp.sub('&', _tmp3)
|
||||
else:
|
||||
_tmp3 = _tmp3.replace('&', '&')
|
||||
if ('<' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('<', '<')
|
||||
if ('>' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('>', '>')
|
||||
if ('"' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('"', '"')
|
||||
_write(((' href="' + _tmp3) + '"'))
|
||||
u'_content'
|
||||
_write('>')
|
||||
_tmp3 = _content
|
||||
_tmp = _tmp3
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'</a>\n </div>\n </div>')
|
||||
if (_tmp2 == 0):
|
||||
break
|
||||
_write(' ')
|
||||
_write(u'\n </div>\n')
|
||||
u"{'main': _callback_main}"
|
||||
_tmp = {'main': _callback_main, }
|
||||
u"main.macros['master']"
|
||||
_metal.render(_tmp, _out=_out, _write=_write, _domain=_domain, econtext=econtext)
|
||||
return _out.getvalue()
|
||||
return render
|
||||
|
||||
__filename__ = '/Users/gawel/py/formalchemy_project/pyramid_formalchemy/pyramid_formalchemy/templates/admin/models.pt'
|
||||
registry[(None, True, '1488bdb950901f8f258549439ef6661a49aae984')] = bind()
|
||||
@@ -0,0 +1,178 @@
|
||||
registry = dict(version=0)
|
||||
def bind():
|
||||
from cPickle import loads as _loads
|
||||
_lookup_attr = _loads('cchameleon.core.codegen\nlookup_attr\np1\n.')
|
||||
_init_scope = _loads('cchameleon.core.utils\necontext\np1\n.')
|
||||
_re_amp = _loads("cre\n_compile\np1\n(S'&(?!([A-Za-z]+|#[0-9]+);)'\np2\nI0\ntRp3\n.")
|
||||
_attrs_4356615376 = _loads('(dp1\nVhref\np2\nV#\nsVclass\np3\nVui-widget-header ui-widget-link ui-widget-button ui-corner-all\np4\ns.')
|
||||
_attrs_4356594192 = _loads('(dp1\n.')
|
||||
_attrs_4356613392 = _loads('(dp1\nVclass\np2\nVui-widget-header ui-widget-link ui-corner-all\np3\ns.')
|
||||
_attrs_4355158224 = _loads('(dp1\n.')
|
||||
_init_stream = _loads('cchameleon.core.generation\ninitialize_stream\np1\n.')
|
||||
_attrs_4355158672 = _loads('(dp1\nVmethod\np2\nVPOST\np3\nsVenctype\np4\nVmultipart/form-data\np5\ns.')
|
||||
_attrs_4356612688 = _loads("(dp1\nVtype\np2\nVsubmit\np3\nsVvalue\np4\nV${F_('Save')}\np5\ns.")
|
||||
_attrs_4356595088 = _loads('(dp1\nVclass\np2\nVfa_field\np3\ns.')
|
||||
_init_default = _loads('cchameleon.core.generation\ninitialize_default\np1\n.')
|
||||
_attrs_4356612624 = _loads('(dp1\nVclass\np2\nVui-icon ui-icon-circle-arrow-w\np3\ns.')
|
||||
_init_tal = _loads('cchameleon.core.generation\ninitialize_tal\np1\n.')
|
||||
def render(econtext, rcontext=None):
|
||||
macros = econtext.get('macros')
|
||||
_translate = econtext.get('_translate')
|
||||
_slots = econtext.get('_slots')
|
||||
target_language = econtext.get('target_language')
|
||||
u'_init_stream()'
|
||||
(_out, _write, ) = _init_stream()
|
||||
u'_init_tal()'
|
||||
(_attributes, repeat, ) = _init_tal()
|
||||
u'_init_default()'
|
||||
_default = _init_default()
|
||||
u'None'
|
||||
default = None
|
||||
u'None'
|
||||
_domain = None
|
||||
u"main.macros['master']"
|
||||
_metal = _lookup_attr(econtext['main'], 'macros')['master']
|
||||
def _callback_main(econtext, _repeat, _out=_out, _write=_write, _domain=_domain, **_ignored):
|
||||
if _repeat:
|
||||
repeat.update(_repeat)
|
||||
attrs = _attrs_4355158224
|
||||
_write(u'<div>\n ')
|
||||
attrs = _attrs_4355158672
|
||||
u'request.route_url(request.route_name, traverse=request.model_name)'
|
||||
_write(u'<form method="POST" enctype="multipart/form-data"')
|
||||
_tmp1 = _lookup_attr(econtext['request'], 'route_url')(_lookup_attr(econtext['request'], 'route_name'), traverse=_lookup_attr(econtext['request'], 'model_name'))
|
||||
if (_tmp1 is _default):
|
||||
_tmp1 = None
|
||||
if ((_tmp1 is not None) and (_tmp1 is not False)):
|
||||
if (_tmp1.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp1 = unicode(_translate(_tmp1, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp1, unicode):
|
||||
_tmp1 = str(_tmp1)
|
||||
if ('&' in _tmp1):
|
||||
if (';' in _tmp1):
|
||||
_tmp1 = _re_amp.sub('&', _tmp1)
|
||||
else:
|
||||
_tmp1 = _tmp1.replace('&', '&')
|
||||
if ('<' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('<', '<')
|
||||
if ('>' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('>', '>')
|
||||
if ('"' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('"', '"')
|
||||
_write(((' action="' + _tmp1) + '"'))
|
||||
u"''"
|
||||
_write(u'>\n ')
|
||||
_default.value = default = ''
|
||||
u'fs.render()'
|
||||
_content = _lookup_attr(econtext['fs'], 'render')()
|
||||
attrs = _attrs_4356594192
|
||||
u'_content'
|
||||
_write(u'<div>')
|
||||
_tmp1 = _content
|
||||
_tmp = _tmp1
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
_write(_tmp)
|
||||
_write(u'</div>\n ')
|
||||
attrs = _attrs_4356595088
|
||||
_write(u'<p class="fa_field">\n ')
|
||||
attrs = _attrs_4356615376
|
||||
_write(u'<a class="ui-widget-header ui-widget-link ui-widget-button ui-corner-all" href="#">\n ')
|
||||
attrs = _attrs_4356612688
|
||||
'join(value("F_(\'Save\')"),)'
|
||||
_write(u'<input type="submit"')
|
||||
_tmp1 = econtext['F_']('Save')
|
||||
if (_tmp1 is _default):
|
||||
_tmp1 = u"${F_('Save')}"
|
||||
if ((_tmp1 is not None) and (_tmp1 is not False)):
|
||||
if (_tmp1.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp1 = unicode(_translate(_tmp1, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp1, unicode):
|
||||
_tmp1 = str(_tmp1)
|
||||
if ('&' in _tmp1):
|
||||
if (';' in _tmp1):
|
||||
_tmp1 = _re_amp.sub('&', _tmp1)
|
||||
else:
|
||||
_tmp1 = _tmp1.replace('&', '&')
|
||||
if ('<' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('<', '<')
|
||||
if ('>' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('>', '>')
|
||||
if ('"' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('"', '"')
|
||||
_write(((' value="' + _tmp1) + '"'))
|
||||
_write(u' />\n </a>\n ')
|
||||
attrs = _attrs_4356613392
|
||||
u'request.route_url(request.route_name, traverse=request.model_name)'
|
||||
_write(u'<a class="ui-widget-header ui-widget-link ui-corner-all"')
|
||||
_tmp1 = _lookup_attr(econtext['request'], 'route_url')(_lookup_attr(econtext['request'], 'route_name'), traverse=_lookup_attr(econtext['request'], 'model_name'))
|
||||
if (_tmp1 is _default):
|
||||
_tmp1 = None
|
||||
if ((_tmp1 is not None) and (_tmp1 is not False)):
|
||||
if (_tmp1.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp1 = unicode(_translate(_tmp1, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp1, unicode):
|
||||
_tmp1 = str(_tmp1)
|
||||
if ('&' in _tmp1):
|
||||
if (';' in _tmp1):
|
||||
_tmp1 = _re_amp.sub('&', _tmp1)
|
||||
else:
|
||||
_tmp1 = _tmp1.replace('&', '&')
|
||||
if ('<' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('<', '<')
|
||||
if ('>' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('>', '>')
|
||||
if ('"' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('"', '"')
|
||||
_write(((' href="' + _tmp1) + '"'))
|
||||
_write(u'>\n ')
|
||||
attrs = _attrs_4356612624
|
||||
u"F_('Cancel')"
|
||||
_write(u'<span class="ui-icon ui-icon-circle-arrow-w"></span>\n ')
|
||||
_tmp1 = econtext['F_']('Cancel')
|
||||
_tmp = _tmp1
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'\n </a>\n </p>\n </form>\n </div>\n')
|
||||
u"{'main': _callback_main}"
|
||||
_tmp = {'main': _callback_main, }
|
||||
u"main.macros['master']"
|
||||
_metal.render(_tmp, _out=_out, _write=_write, _domain=_domain, econtext=econtext)
|
||||
return _out.getvalue()
|
||||
return render
|
||||
|
||||
__filename__ = '/Users/gawel/py/formalchemy_project/pyramid_formalchemy/pyramid_formalchemy/templates/admin/new.pt'
|
||||
registry[(None, True, '1488bdb950901f8f258549439ef6661a49aae984')] = bind()
|
||||
@@ -1,96 +0,0 @@
|
||||
{{if template_engine == 'mako'}}
|
||||
# -*- coding: utf-8 -*-
|
||||
<%!
|
||||
from formalchemy.ext.pylons.controller import model_url
|
||||
from pylons import url
|
||||
%>
|
||||
<%def name="h1(title, href=None)">
|
||||
<h1 id="header" class="ui-widget-header ui-corner-all">
|
||||
%if breadcrumb:
|
||||
<div class="breadcrumb">
|
||||
/${'/'.join([u and '<a href="%s">%s</a>' % (u,n.lower()) or n.lower() for u,n in breadcrumb])|n}
|
||||
</div>
|
||||
%endif
|
||||
%if href:
|
||||
<a href="${href}">${title.title()}</a>
|
||||
%else:
|
||||
${title.title()}
|
||||
%endif
|
||||
</h1>
|
||||
</%def>
|
||||
<%def name="buttons()">
|
||||
<p class="fa_field">
|
||||
<a class="ui-widget-header ui-widget-link ui-widget-button ui-corner-all" href="#">
|
||||
<input type="submit" value="${F_('Save')}" />
|
||||
</a>
|
||||
<a class="ui-widget-header ui-widget-link ui-corner-all" href="${model_url(collection_name)}">
|
||||
<span class="ui-icon ui-icon-circle-arrow-w"></span>
|
||||
${F_('Cancel')}
|
||||
</a>
|
||||
</p>
|
||||
</%def>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
${collection_name.title()}
|
||||
</title>
|
||||
<link rel="stylesheet" type="text/css" href="${url('fa_static', path_info='/admin.css')}" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="content" class="ui-admin ui-widget">
|
||||
%if isinstance(models, dict):
|
||||
<h1 id="header" class="ui-widget-header ui-corner-all">${F_('Models')}</h1>
|
||||
%for name in sorted(models):
|
||||
<p>
|
||||
<a class="ui-state-default ui-corner-all" href="${models[name]}">${name}</a>
|
||||
</p>
|
||||
%endfor
|
||||
%elif is_grid:
|
||||
${h1(model_name)}
|
||||
<div class="ui-pager">
|
||||
${pager|n}
|
||||
</div>
|
||||
<table class="layout-grid">
|
||||
${fs.render()|n}
|
||||
</table>
|
||||
<p>
|
||||
<a class="ui-widget-header ui-widget-link ui-corner-all" href="${model_url('new_%s' % member_name)}">
|
||||
<span class="ui-icon ui-icon-circle-plus"></span>
|
||||
${F_('New')} ${model_name}
|
||||
</a>
|
||||
</p>
|
||||
%else:
|
||||
${h1(model_name, href=model_url(collection_name))}
|
||||
%if action == 'show':
|
||||
<table>
|
||||
${fs.render()|n}
|
||||
</table>
|
||||
<p class="fa_field">
|
||||
<a class="ui-widget-header ui-widget-link ui-corner-all" href="${model_url('edit_%s' % member_name, id=id)}">
|
||||
<span class="ui-icon ui-icon-pencil"></span>
|
||||
${F_('Edit')}
|
||||
</a>
|
||||
</p>
|
||||
%elif action == 'edit':
|
||||
<form action="${model_url(member_name, id=id)}" method="POST" enctype="multipart/form-data">
|
||||
${fs.render()|n}
|
||||
<input type="hidden" name="_method" value="PUT" />
|
||||
${buttons()}
|
||||
</form>
|
||||
%else:
|
||||
<form action="${model_url(collection_name)}" method="POST" enctype="multipart/form-data">
|
||||
${fs.render()|n}
|
||||
${buttons()}
|
||||
</form>
|
||||
%endif
|
||||
%endif
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var icons = document.getElementsByClassName('ui-icon')
|
||||
for (var i = 0; i < icons.length-1; i++) {
|
||||
icons[i].setAttribute('value', ' ');
|
||||
}
|
||||
</script>
|
||||
</body></html>
|
||||
{{endif}}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
registry = dict(version=0)
|
||||
def bind():
|
||||
from cPickle import loads as _loads
|
||||
_lookup_attr = _loads('cchameleon.core.codegen\nlookup_attr\np1\n.')
|
||||
_init_scope = _loads('cchameleon.core.utils\necontext\np1\n.')
|
||||
_init_stream = _loads('cchameleon.core.generation\ninitialize_stream\np1\n.')
|
||||
_attrs_4357103760 = _loads('(dp1\n.')
|
||||
_init_default = _loads('cchameleon.core.generation\ninitialize_default\np1\n.')
|
||||
_attrs_4357103888 = _loads('(dp1\n.')
|
||||
_init_tal = _loads('cchameleon.core.generation\ninitialize_tal\np1\n.')
|
||||
def render(econtext, rcontext=None):
|
||||
macros = econtext.get('macros')
|
||||
_translate = econtext.get('_translate')
|
||||
_slots = econtext.get('_slots')
|
||||
target_language = econtext.get('target_language')
|
||||
u'_init_stream()'
|
||||
(_out, _write, ) = _init_stream()
|
||||
u'_init_tal()'
|
||||
(_attributes, repeat, ) = _init_tal()
|
||||
u'_init_default()'
|
||||
_default = _init_default()
|
||||
u'None'
|
||||
default = None
|
||||
u'None'
|
||||
_domain = None
|
||||
u"main.macros['master']"
|
||||
_metal = _lookup_attr(econtext['main'], 'macros')['master']
|
||||
def _callback_main(econtext, _repeat, _out=_out, _write=_write, _domain=_domain, **_ignored):
|
||||
if _repeat:
|
||||
repeat.update(_repeat)
|
||||
attrs = _attrs_4357103760
|
||||
u"''"
|
||||
_write(u'<div>\n ')
|
||||
_default.value = default = ''
|
||||
u'fs.render()'
|
||||
_content = _lookup_attr(econtext['fs'], 'render')()
|
||||
attrs = _attrs_4357103888
|
||||
u'_content'
|
||||
_write(u'<div>')
|
||||
_tmp1 = _content
|
||||
_tmp = _tmp1
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
_write(_tmp)
|
||||
u"main.macros['buttons']"
|
||||
_write(u'</div>\n ')
|
||||
_metal = _lookup_attr(econtext['main'], 'macros')['buttons']
|
||||
u'{}'
|
||||
_tmp = {}
|
||||
u"main.macros['buttons']"
|
||||
_metal.render(_tmp, _out=_out, _write=_write, _domain=_domain, econtext=econtext)
|
||||
_write(u'\n </div>\n')
|
||||
u"{'main': _callback_main}"
|
||||
_tmp = {'main': _callback_main, }
|
||||
u"main.macros['master']"
|
||||
_metal.render(_tmp, _out=_out, _write=_write, _domain=_domain, econtext=econtext)
|
||||
return _out.getvalue()
|
||||
return render
|
||||
|
||||
__filename__ = u'/Users/gawel/py/formalchemy_project/pyramid_formalchemy/pyramid_formalchemy/templates/admin/show.pt'
|
||||
registry[(None, True, '1488bdb950901f8f258549439ef6661a49aae984')] = bind()
|
||||
@@ -0,0 +1,31 @@
|
||||
<tal:define tal:define="focus_rendered False">
|
||||
<div tal:condition="fieldset.errors.get(None, False)">
|
||||
<div tal:repeat="error fieldset.error.get(None)" tal:content="error" />
|
||||
</div>
|
||||
|
||||
<tal:field tal:repeat="field fieldset.render_fields.itervalues()">
|
||||
<div class="fa_field ui-widget">
|
||||
<div class="label" tal:condition="field.requires_label">
|
||||
<div tal:condition="isinstance(field.type, fatypes.Boolean)"
|
||||
tal:content="structure field.render()" />
|
||||
<label tal:attributes="class field.is_required() and 'field_req' or 'field_opt';
|
||||
for field.renderer.name">
|
||||
<span tal:replace="[field.label_text, fieldset.prettify(field.key)][int(field.label_text is None)]" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="fa_instructions ui-corner-all"
|
||||
tal:content="field.metadata['instructions']"
|
||||
tal:condition="'instructions' in field.metadata">
|
||||
</div>
|
||||
<div class="ui-state-error ui-corner-all" tal:condition="field.errors">
|
||||
<div tal:repeat="error field.errors" tal:content="error" />
|
||||
</div>
|
||||
<div class="field_input" tal:condition="not isinstance(field.type, fatypes.Boolean)"
|
||||
tal:content="structure field.render()" />
|
||||
</div>
|
||||
<script tal:condition="not field.is_readonly() and (fieldset.focus == field or fieldset.focus is True) and not focus_rendered">
|
||||
<tal:define tal:define="global focus_rendered True" />
|
||||
jQuery(document).ready(function(){jQuery("[name='${field.renderer.name}']").focus();});
|
||||
</script>
|
||||
</tal:field>
|
||||
</tal:define>
|
||||
@@ -0,0 +1,367 @@
|
||||
registry = dict(version=0)
|
||||
def bind():
|
||||
from cPickle import loads as _loads
|
||||
_attrs_4301975440 = _loads('(dp1\nVclass\np2\nVfield_input\np3\ns.')
|
||||
_lookup_attr = _loads('cchameleon.core.codegen\nlookup_attr\np1\n.')
|
||||
_init_scope = _loads('cchameleon.core.utils\necontext\np1\n.')
|
||||
_re_amp = _loads("cre\n_compile\np1\n(S'&(?!([A-Za-z]+|#[0-9]+);)'\np2\nI0\ntRp3\n.")
|
||||
_attrs_4301975312 = _loads('(dp1\nVclass\np2\nVui-state-error ui-corner-all\np3\ns.')
|
||||
_attrs_4301975504 = _loads('(dp1\n.')
|
||||
_attrs_4301974800 = _loads('(dp1\n.')
|
||||
_attrs_4301975120 = _loads('(dp1\nVclass\np2\nVfa_instructions ui-corner-all\np3\ns.')
|
||||
_attrs_4301975248 = _loads('(dp1\n.')
|
||||
_init_stream = _loads('cchameleon.core.generation\ninitialize_stream\np1\n.')
|
||||
_attrs_4301975056 = _loads('(dp1\nVclass\np2\nVlabel\np3\ns.')
|
||||
_init_default = _loads('cchameleon.core.generation\ninitialize_default\np1\n.')
|
||||
_attrs_4301974992 = _loads('(dp1\n.')
|
||||
_attrs_4301974544 = _loads('(dp1\n.')
|
||||
_attrs_4301974928 = _loads('(dp1\nVclass\np2\nVfa_field ui-widget\np3\ns.')
|
||||
_attrs_4301975184 = _loads('(dp1\n.')
|
||||
_init_tal = _loads('cchameleon.core.generation\ninitialize_tal\np1\n.')
|
||||
def render(econtext, rcontext=None):
|
||||
macros = econtext.get('macros')
|
||||
_translate = econtext.get('_translate')
|
||||
_slots = econtext.get('_slots')
|
||||
target_language = econtext.get('target_language')
|
||||
u'_init_stream()'
|
||||
(_out, _write, ) = _init_stream()
|
||||
u'_init_tal()'
|
||||
(_attributes, repeat, ) = _init_tal()
|
||||
u'_init_default()'
|
||||
_default = _init_default()
|
||||
u'None'
|
||||
default = None
|
||||
u'None'
|
||||
_domain = None
|
||||
u'False'
|
||||
focus_rendered = False
|
||||
u'fieldset.errors.get(None, False)'
|
||||
_write(u'\n')
|
||||
_tmp1 = _lookup_attr(_lookup_attr(econtext['fieldset'], 'errors'), 'get')(None, False)
|
||||
if _tmp1:
|
||||
pass
|
||||
attrs = _attrs_4301974544
|
||||
u"''"
|
||||
_write(u'<div>\n ')
|
||||
_default.value = default = ''
|
||||
u'fieldset.error.get(None)'
|
||||
_tmp1 = _lookup_attr(_lookup_attr(econtext['fieldset'], 'error'), 'get')(None)
|
||||
error = None
|
||||
(_tmp1, _tmp2, ) = repeat.insert('error', _tmp1)
|
||||
for error in _tmp1:
|
||||
_tmp2 = (_tmp2 - 1)
|
||||
u'error'
|
||||
_content = error
|
||||
attrs = _attrs_4301974800
|
||||
u'_content'
|
||||
_write(u'<div>')
|
||||
_tmp3 = _content
|
||||
_tmp = _tmp3
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'</div>')
|
||||
if (_tmp2 == 0):
|
||||
break
|
||||
_write(' ')
|
||||
_write(u'\n</div>')
|
||||
u'fieldset.render_fields.itervalues()'
|
||||
_write(u'\n\n')
|
||||
_tmp1 = _lookup_attr(_lookup_attr(econtext['fieldset'], 'render_fields'), 'itervalues')()
|
||||
field = None
|
||||
(_tmp1, _tmp2, ) = repeat.insert('field', _tmp1)
|
||||
for field in _tmp1:
|
||||
_tmp2 = (_tmp2 - 1)
|
||||
_write(u'\n ')
|
||||
attrs = _attrs_4301974928
|
||||
u'field.requires_label'
|
||||
_write(u'<div class="fa_field ui-widget">\n ')
|
||||
_tmp3 = _lookup_attr(field, 'requires_label')
|
||||
if _tmp3:
|
||||
pass
|
||||
attrs = _attrs_4301975056
|
||||
u"''"
|
||||
_write(u'<div class="label">\n ')
|
||||
_default.value = default = ''
|
||||
u'isinstance(field.type, fatypes.Boolean)'
|
||||
_tmp3 = isinstance(_lookup_attr(field, 'type'), _lookup_attr(econtext['fatypes'], 'Boolean'))
|
||||
if _tmp3:
|
||||
pass
|
||||
u'field.render()'
|
||||
_content = _lookup_attr(field, 'render')()
|
||||
attrs = _attrs_4301975184
|
||||
u'_content'
|
||||
_write(u'<div>')
|
||||
_tmp3 = _content
|
||||
_tmp = _tmp3
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
_write(_tmp)
|
||||
_write(u'</div>')
|
||||
_write(u'\n ')
|
||||
attrs = _attrs_4301975248
|
||||
u"field.is_required() and 'field_req' or 'field_opt'"
|
||||
_write(u'<label')
|
||||
_tmp3 = ((_lookup_attr(field, 'is_required')() and 'field_req') or 'field_opt')
|
||||
if (_tmp3 is _default):
|
||||
_tmp3 = None
|
||||
if ((_tmp3 is not None) and (_tmp3 is not False)):
|
||||
if (_tmp3.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp3 = unicode(_translate(_tmp3, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp3, unicode):
|
||||
_tmp3 = str(_tmp3)
|
||||
if ('&' in _tmp3):
|
||||
if (';' in _tmp3):
|
||||
_tmp3 = _re_amp.sub('&', _tmp3)
|
||||
else:
|
||||
_tmp3 = _tmp3.replace('&', '&')
|
||||
if ('<' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('<', '<')
|
||||
if ('>' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('>', '>')
|
||||
if ('"' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('"', '"')
|
||||
_write(((' class="' + _tmp3) + '"'))
|
||||
u'field.renderer.name'
|
||||
_tmp3 = _lookup_attr(_lookup_attr(field, 'renderer'), 'name')
|
||||
if (_tmp3 is _default):
|
||||
_tmp3 = None
|
||||
if ((_tmp3 is not None) and (_tmp3 is not False)):
|
||||
if (_tmp3.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp3 = unicode(_translate(_tmp3, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp3, unicode):
|
||||
_tmp3 = str(_tmp3)
|
||||
if ('&' in _tmp3):
|
||||
if (';' in _tmp3):
|
||||
_tmp3 = _re_amp.sub('&', _tmp3)
|
||||
else:
|
||||
_tmp3 = _tmp3.replace('&', '&')
|
||||
if ('<' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('<', '<')
|
||||
if ('>' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('>', '>')
|
||||
if ('"' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('"', '"')
|
||||
_write(((' for="' + _tmp3) + '"'))
|
||||
u"''"
|
||||
_write(u'>\n ')
|
||||
_default.value = default = ''
|
||||
u'[field.label_text, fieldset.prettify(field.key)][int(field.label_text is None)]'
|
||||
_content = [_lookup_attr(field, 'label_text'), _lookup_attr(econtext['fieldset'], 'prettify')(_lookup_attr(field, 'key')), ][int((_lookup_attr(field, 'label_text') is None))]
|
||||
u'_content'
|
||||
_tmp3 = _content
|
||||
_tmp = _tmp3
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'\n </label>\n </div>')
|
||||
u"u'\\n '"
|
||||
_write(u'\n ')
|
||||
_default.value = default = u'\n '
|
||||
u"'instructions' in field.metadata"
|
||||
_tmp3 = ('instructions' in _lookup_attr(field, 'metadata'))
|
||||
if _tmp3:
|
||||
pass
|
||||
u"field.metadata['instructions']"
|
||||
_content = _lookup_attr(field, 'metadata')['instructions']
|
||||
attrs = _attrs_4301975120
|
||||
u'_content'
|
||||
_write(u'<div class="fa_instructions ui-corner-all">')
|
||||
_tmp3 = _content
|
||||
_tmp = _tmp3
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'</div>')
|
||||
u'field.errors'
|
||||
_write(u'\n ')
|
||||
_tmp3 = _lookup_attr(field, 'errors')
|
||||
if _tmp3:
|
||||
pass
|
||||
attrs = _attrs_4301975312
|
||||
u"''"
|
||||
_write(u'<div class="ui-state-error ui-corner-all">\n ')
|
||||
_default.value = default = ''
|
||||
u'field.errors'
|
||||
_tmp3 = _lookup_attr(field, 'errors')
|
||||
error = None
|
||||
(_tmp3, _tmp4, ) = repeat.insert('error', _tmp3)
|
||||
for error in _tmp3:
|
||||
_tmp4 = (_tmp4 - 1)
|
||||
u'error'
|
||||
_content = error
|
||||
attrs = _attrs_4301975504
|
||||
u'_content'
|
||||
_write(u'<div>')
|
||||
_tmp5 = _content
|
||||
_tmp = _tmp5
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'</div>')
|
||||
if (_tmp4 == 0):
|
||||
break
|
||||
_write(' ')
|
||||
_write(u'\n </div>')
|
||||
u"''"
|
||||
_write(u'\n ')
|
||||
_default.value = default = ''
|
||||
u'not isinstance(field.type, fatypes.Boolean)'
|
||||
_tmp3 = not isinstance(_lookup_attr(field, 'type'), _lookup_attr(econtext['fatypes'], 'Boolean'))
|
||||
if _tmp3:
|
||||
pass
|
||||
u'field.render()'
|
||||
_content = _lookup_attr(field, 'render')()
|
||||
attrs = _attrs_4301975440
|
||||
u'_content'
|
||||
_write(u'<div class="field_input">')
|
||||
_tmp3 = _content
|
||||
_tmp = _tmp3
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
_write(_tmp)
|
||||
_write(u'</div>')
|
||||
u'not field.is_readonly() and (fieldset.focus == field or fieldset.focus is True) and not focus_rendered'
|
||||
_write(u'\n </div>\n ')
|
||||
_tmp3 = (not _lookup_attr(field, 'is_readonly')() and ((_lookup_attr(econtext['fieldset'], 'focus') == field) or (_lookup_attr(econtext['fieldset'], 'focus') is True)) and not focus_rendered)
|
||||
if _tmp3:
|
||||
pass
|
||||
attrs = _attrs_4301974992
|
||||
u'True'
|
||||
_write(u'<script>\n ')
|
||||
focus_rendered = True
|
||||
u'field.renderer.name'
|
||||
_write(u'\n jQuery(document).ready(function(){jQuery("[name=\'')
|
||||
_tmp3 = _lookup_attr(_lookup_attr(field, 'renderer'), 'name')
|
||||
_tmp = _tmp3
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'\']").focus();});\n </script>')
|
||||
_write(u'\n')
|
||||
if (_tmp2 == 0):
|
||||
break
|
||||
_write(' ')
|
||||
_write(u'')
|
||||
return _out.getvalue()
|
||||
return render
|
||||
|
||||
__filename__ = '/Users/gawel/py/formalchemy_project/fa.jquery/fa/jquery/templates/forms/fieldset.pt'
|
||||
registry[(None, True, '1488bdb950901f8f258549439ef6661a49aae984')] = bind()
|
||||
@@ -0,0 +1,17 @@
|
||||
<tbody>
|
||||
<tal:field tal:repeat="field fieldset.render_fields.itervalues()">
|
||||
<tr tal:condition="field.requires_label">
|
||||
<td class="field_readonly">
|
||||
<label tal:content="[field.label_text, fieldset.prettify(field.key)][int(field.label_text is None)]"
|
||||
/>
|
||||
</td>
|
||||
<td tal:content="structure field.render_readonly()" />
|
||||
</tr>
|
||||
</tal:field>
|
||||
<tr style="display:none"><td> </td><td>
|
||||
<tal:field tal:repeat="field fieldset.render_fields.itervalues()">
|
||||
<div tal:condition="not field.requires_label" tal:replace="structure field.render_readonly()" />
|
||||
</tal:field>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -0,0 +1,156 @@
|
||||
registry = dict(version=0)
|
||||
def bind():
|
||||
from cPickle import loads as _loads
|
||||
_attrs_4354113680 = _loads('(dp1\n.')
|
||||
_lookup_attr = _loads('cchameleon.core.codegen\nlookup_attr\np1\n.')
|
||||
_init_scope = _loads('cchameleon.core.utils\necontext\np1\n.')
|
||||
_re_amp = _loads("cre\n_compile\np1\n(S'&(?!([A-Za-z]+|#[0-9]+);)'\np2\nI0\ntRp3\n.")
|
||||
_attrs_4354096784 = _loads('(dp1\n.')
|
||||
_attrs_4354113616 = _loads('(dp1\nVclass\np2\nVfield_readonly\np3\ns.')
|
||||
_attrs_4354096976 = _loads('(dp1\nVstyle\np2\nVdisplay:none\np3\ns.')
|
||||
_attrs_4354113744 = _loads('(dp1\n.')
|
||||
_attrs_4354113808 = _loads('(dp1\n.')
|
||||
_init_stream = _loads('cchameleon.core.generation\ninitialize_stream\np1\n.')
|
||||
_attrs_4354097040 = _loads('(dp1\n.')
|
||||
_init_default = _loads('cchameleon.core.generation\ninitialize_default\np1\n.')
|
||||
_attrs_4354113872 = _loads('(dp1\n.')
|
||||
_init_tal = _loads('cchameleon.core.generation\ninitialize_tal\np1\n.')
|
||||
def render(econtext, rcontext=None):
|
||||
macros = econtext.get('macros')
|
||||
_translate = econtext.get('_translate')
|
||||
_slots = econtext.get('_slots')
|
||||
target_language = econtext.get('target_language')
|
||||
u'_init_stream()'
|
||||
(_out, _write, ) = _init_stream()
|
||||
u'_init_tal()'
|
||||
(_attributes, repeat, ) = _init_tal()
|
||||
u'_init_default()'
|
||||
_default = _init_default()
|
||||
u'None'
|
||||
default = None
|
||||
u'None'
|
||||
_domain = None
|
||||
attrs = _attrs_4354096784
|
||||
u'fieldset.render_fields.itervalues()'
|
||||
_write(u'<tbody>\n ')
|
||||
_tmp1 = _lookup_attr(_lookup_attr(econtext['fieldset'], 'render_fields'), 'itervalues')()
|
||||
field = None
|
||||
(_tmp1, _tmp2, ) = repeat.insert('field', _tmp1)
|
||||
for field in _tmp1:
|
||||
_tmp2 = (_tmp2 - 1)
|
||||
u'field.requires_label'
|
||||
_write(u'')
|
||||
_tmp3 = _lookup_attr(field, 'requires_label')
|
||||
if _tmp3:
|
||||
pass
|
||||
attrs = _attrs_4354097040
|
||||
_write(u'<tr>\n ')
|
||||
attrs = _attrs_4354113616
|
||||
u"''"
|
||||
_write(u'<td class="field_readonly">\n ')
|
||||
_default.value = default = ''
|
||||
u'[field.label_text, fieldset.prettify(field.key)][int(field.label_text is None)]'
|
||||
_content = [_lookup_attr(field, 'label_text'), _lookup_attr(econtext['fieldset'], 'prettify')(_lookup_attr(field, 'key')), ][int((_lookup_attr(field, 'label_text') is None))]
|
||||
attrs = _attrs_4354113744
|
||||
u'_content'
|
||||
_write(u'<label>')
|
||||
_tmp3 = _content
|
||||
_tmp = _tmp3
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
u"''"
|
||||
_write(u'</label>\n </td>\n ')
|
||||
_default.value = default = ''
|
||||
u'field.render_readonly()'
|
||||
_content = _lookup_attr(field, 'render_readonly')()
|
||||
attrs = _attrs_4354113680
|
||||
u'_content'
|
||||
_write(u'<td>')
|
||||
_tmp3 = _content
|
||||
_tmp = _tmp3
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
_write(_tmp)
|
||||
_write(u'</td>\n </tr>')
|
||||
_write(u'\n ')
|
||||
if (_tmp2 == 0):
|
||||
break
|
||||
_write(' ')
|
||||
_write(u'\n ')
|
||||
attrs = _attrs_4354096976
|
||||
_write(u'<tr style="display:none">')
|
||||
attrs = _attrs_4354113808
|
||||
_write(u'<td> </td>')
|
||||
attrs = _attrs_4354113872
|
||||
u'fieldset.render_fields.itervalues()'
|
||||
_write(u'<td>\n ')
|
||||
_tmp1 = _lookup_attr(_lookup_attr(econtext['fieldset'], 'render_fields'), 'itervalues')()
|
||||
field = None
|
||||
(_tmp1, _tmp2, ) = repeat.insert('field', _tmp1)
|
||||
for field in _tmp1:
|
||||
_tmp2 = (_tmp2 - 1)
|
||||
u"''"
|
||||
_write(u'')
|
||||
_default.value = default = ''
|
||||
u'not field.requires_label'
|
||||
_tmp3 = not _lookup_attr(field, 'requires_label')
|
||||
if _tmp3:
|
||||
pass
|
||||
u'field.render_readonly()'
|
||||
_content = _lookup_attr(field, 'render_readonly')()
|
||||
u'_content'
|
||||
_tmp3 = _content
|
||||
_tmp = _tmp3
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
_write(_tmp)
|
||||
_write(u'\n ')
|
||||
if (_tmp2 == 0):
|
||||
break
|
||||
_write(' ')
|
||||
_write(u'\n </td>\n </tr>\n</tbody>')
|
||||
return _out.getvalue()
|
||||
return render
|
||||
|
||||
__filename__ = '/Users/gawel/py/formalchemy_project/pyramid_formalchemy/pyramid_formalchemy/templates/forms/fieldset_readonly.pt'
|
||||
registry[(None, True, '1488bdb950901f8f258549439ef6661a49aae984')] = bind()
|
||||
@@ -0,0 +1,21 @@
|
||||
<table class="layout-grid">
|
||||
<thead>
|
||||
<tr class="ui-widget-header">
|
||||
<th tal:repeat="field collection.render_fields.itervalues()"
|
||||
tal:content="field.label_text or collection.prettify(field.key)"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tal:row tal:repeat="row collection.rows">
|
||||
<tr tal:define="dummy collection._set_active(row);
|
||||
row_errors collection.get_errors(row);"
|
||||
tal:attributes="class string:ui-widget-${repeat.row.even and 'even' or 'odd'}">
|
||||
<td tal:repeat="field collection.render_fields.itervalues()">
|
||||
<div tal:replace="structure field.render()" />
|
||||
<div tal:repeat="error row_errors.get(field, [])" class="grid_error">${error}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tal:row>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
registry = dict(version=0)
|
||||
def bind():
|
||||
from cPickle import loads as _loads
|
||||
_lookup_attr = _loads('cchameleon.core.codegen\nlookup_attr\np1\n.')
|
||||
_attrs_4349827536 = _loads('(dp1\n.')
|
||||
_init_scope = _loads('cchameleon.core.utils\necontext\np1\n.')
|
||||
_attrs_4349879568 = _loads('(dp1\nVclass\np2\nVlayout-grid\np3\ns.')
|
||||
_attrs_4349825872 = _loads('(dp1\nVclass\np2\nVgrid_error\np3\ns.')
|
||||
_attrs_4349881488 = _loads('(dp1\n.')
|
||||
_attrs_4349879888 = _loads('(dp1\n.')
|
||||
_init_stream = _loads('cchameleon.core.generation\ninitialize_stream\np1\n.')
|
||||
_attrs_4349880336 = _loads('(dp1\n.')
|
||||
_attrs_4349879504 = _loads('(dp1\n.')
|
||||
_init_default = _loads('cchameleon.core.generation\ninitialize_default\np1\n.')
|
||||
_re_amp = _loads("cre\n_compile\np1\n(S'&(?!([A-Za-z]+|#[0-9]+);)'\np2\nI0\ntRp3\n.")
|
||||
_attrs_4349879952 = _loads('(dp1\nVclass\np2\nVui-widget-header\np3\ns.')
|
||||
_init_tal = _loads('cchameleon.core.generation\ninitialize_tal\np1\n.')
|
||||
def render(econtext, rcontext=None):
|
||||
macros = econtext.get('macros')
|
||||
_translate = econtext.get('_translate')
|
||||
_slots = econtext.get('_slots')
|
||||
target_language = econtext.get('target_language')
|
||||
u'_init_stream()'
|
||||
(_out, _write, ) = _init_stream()
|
||||
u'_init_tal()'
|
||||
(_attributes, repeat, ) = _init_tal()
|
||||
u'_init_default()'
|
||||
_default = _init_default()
|
||||
u'None'
|
||||
default = None
|
||||
u'None'
|
||||
_domain = None
|
||||
attrs = _attrs_4349879568
|
||||
_write(u'<table class="layout-grid">\n')
|
||||
attrs = _attrs_4349880336
|
||||
_write(u'<thead>\n ')
|
||||
attrs = _attrs_4349879952
|
||||
u"''"
|
||||
_write(u'<tr class="ui-widget-header">\n ')
|
||||
_default.value = default = ''
|
||||
u'collection.render_fields.itervalues()'
|
||||
_tmp1 = _lookup_attr(_lookup_attr(econtext['collection'], 'render_fields'), 'itervalues')()
|
||||
field = None
|
||||
(_tmp1, _tmp2, ) = repeat.insert('field', _tmp1)
|
||||
for field in _tmp1:
|
||||
_tmp2 = (_tmp2 - 1)
|
||||
u'field.label_text or collection.prettify(field.key)'
|
||||
_content = (_lookup_attr(field, 'label_text') or _lookup_attr(econtext['collection'], 'prettify')(_lookup_attr(field, 'key')))
|
||||
attrs = _attrs_4349879504
|
||||
u'_content'
|
||||
_write(u'<th>')
|
||||
_tmp3 = _content
|
||||
_tmp = _tmp3
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'</th>')
|
||||
if (_tmp2 == 0):
|
||||
break
|
||||
_write(' ')
|
||||
_write(u'\n </tr>\n</thead>\n')
|
||||
attrs = _attrs_4349881488
|
||||
u'collection.rows'
|
||||
_write(u'<tbody>\n ')
|
||||
_tmp1 = _lookup_attr(econtext['collection'], 'rows')
|
||||
row = None
|
||||
(_tmp1, _tmp2, ) = repeat.insert('row', _tmp1)
|
||||
for row in _tmp1:
|
||||
_tmp2 = (_tmp2 - 1)
|
||||
u'collection._set_active(row)'
|
||||
_write(u'')
|
||||
dummy = _lookup_attr(econtext['collection'], '_set_active')(row)
|
||||
u'collection.get_errors(row)'
|
||||
row_errors = _lookup_attr(econtext['collection'], 'get_errors')(row)
|
||||
attrs = _attrs_4349879888
|
||||
u"ui-widget-${repeat.row.even and 'even' or 'odd'}"
|
||||
_write(u'<tr')
|
||||
_tmp3 = ('%s%s' % (u'ui-widget-', ((_lookup_attr(repeat.row, 'even') and 'even') or 'odd'), ))
|
||||
if (_tmp3 is _default):
|
||||
_tmp3 = None
|
||||
if ((_tmp3 is not None) and (_tmp3 is not False)):
|
||||
if (_tmp3.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp3 = unicode(_translate(_tmp3, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp3, unicode):
|
||||
_tmp3 = str(_tmp3)
|
||||
if ('&' in _tmp3):
|
||||
if (';' in _tmp3):
|
||||
_tmp3 = _re_amp.sub('&', _tmp3)
|
||||
else:
|
||||
_tmp3 = _tmp3.replace('&', '&')
|
||||
if ('<' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('<', '<')
|
||||
if ('>' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('>', '>')
|
||||
if ('"' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('"', '"')
|
||||
_write(((' class="' + _tmp3) + '"'))
|
||||
u'collection.render_fields.itervalues()'
|
||||
_write(u'>\n ')
|
||||
_tmp3 = _lookup_attr(_lookup_attr(econtext['collection'], 'render_fields'), 'itervalues')()
|
||||
field = None
|
||||
(_tmp3, _tmp4, ) = repeat.insert('field', _tmp3)
|
||||
for field in _tmp3:
|
||||
_tmp4 = (_tmp4 - 1)
|
||||
attrs = _attrs_4349827536
|
||||
u"''"
|
||||
_write(u'<td>\n ')
|
||||
_default.value = default = ''
|
||||
u'field.render()'
|
||||
_content = _lookup_attr(field, 'render')()
|
||||
u'_content'
|
||||
_tmp5 = _content
|
||||
_tmp = _tmp5
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
_write(_tmp)
|
||||
u'row_errors.get(field, [])'
|
||||
_write(u'\n ')
|
||||
_tmp5 = _lookup_attr(row_errors, 'get')(field, [])
|
||||
error = None
|
||||
(_tmp5, _tmp6, ) = repeat.insert('error', _tmp5)
|
||||
for error in _tmp5:
|
||||
_tmp6 = (_tmp6 - 1)
|
||||
attrs = _attrs_4349825872
|
||||
u'error'
|
||||
_write(u'<div class="grid_error">')
|
||||
_tmp7 = error
|
||||
_tmp = _tmp7
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'</div>')
|
||||
if (_tmp6 == 0):
|
||||
break
|
||||
_write(' ')
|
||||
_write(u'\n </td>')
|
||||
if (_tmp4 == 0):
|
||||
break
|
||||
_write(' ')
|
||||
_write(u'\n </tr>\n ')
|
||||
if (_tmp2 == 0):
|
||||
break
|
||||
_write(' ')
|
||||
_write(u'\n</tbody>\n</table>')
|
||||
return _out.getvalue()
|
||||
return render
|
||||
|
||||
__filename__ = '/Users/gawel/py/formalchemy_project/pyramid_formalchemy/pyramid_formalchemy/templates/forms/grid.pt'
|
||||
registry[(None, True, '1488bdb950901f8f258549439ef6661a49aae984')] = bind()
|
||||
@@ -0,0 +1,17 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="ui-widget-header">
|
||||
<th tal:repeat="field collection.render_fields.itervalues()"
|
||||
tal:content="field.label_text or collection.prettify(field.key)"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tal:row tal:repeat="row collection.rows">
|
||||
<tr tal:define="dummy collection._set_active(row);" tal:attributes="class string:ui-widget-${repeat.row.even and 'even' or 'odd'}">
|
||||
<td tal:repeat="field collection.render_fields.itervalues()"
|
||||
tal:content="structure field.render_readonly()"/>
|
||||
</tr>
|
||||
</tal:row>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
registry = dict(version=0)
|
||||
def bind():
|
||||
from cPickle import loads as _loads
|
||||
_lookup_attr = _loads('cchameleon.core.codegen\nlookup_attr\np1\n.')
|
||||
_attrs_4354016912 = _loads('(dp1\n.')
|
||||
_init_scope = _loads('cchameleon.core.utils\necontext\np1\n.')
|
||||
_re_amp = _loads("cre\n_compile\np1\n(S'&(?!([A-Za-z]+|#[0-9]+);)'\np2\nI0\ntRp3\n.")
|
||||
_attrs_4354017296 = _loads('(dp1\n.')
|
||||
_attrs_4354016720 = _loads('(dp1\n.')
|
||||
_attrs_4354017104 = _loads('(dp1\n.')
|
||||
_init_stream = _loads('cchameleon.core.generation\ninitialize_stream\np1\n.')
|
||||
_attrs_4354016656 = _loads('(dp1\n.')
|
||||
_init_default = _loads('cchameleon.core.generation\ninitialize_default\np1\n.')
|
||||
_attrs_4354016400 = _loads('(dp1\n.')
|
||||
_attrs_4354016784 = _loads('(dp1\nVclass\np2\nVui-widget-header\np3\ns.')
|
||||
_init_tal = _loads('cchameleon.core.generation\ninitialize_tal\np1\n.')
|
||||
def render(econtext, rcontext=None):
|
||||
macros = econtext.get('macros')
|
||||
_translate = econtext.get('_translate')
|
||||
_slots = econtext.get('_slots')
|
||||
target_language = econtext.get('target_language')
|
||||
u'_init_stream()'
|
||||
(_out, _write, ) = _init_stream()
|
||||
u'_init_tal()'
|
||||
(_attributes, repeat, ) = _init_tal()
|
||||
u'_init_default()'
|
||||
_default = _init_default()
|
||||
u'None'
|
||||
default = None
|
||||
u'None'
|
||||
_domain = None
|
||||
attrs = _attrs_4354016400
|
||||
_write(u'<table>\n ')
|
||||
attrs = _attrs_4354016656
|
||||
_write(u'<thead>\n ')
|
||||
attrs = _attrs_4354016784
|
||||
u"''"
|
||||
_write(u'<tr class="ui-widget-header">\n ')
|
||||
_default.value = default = ''
|
||||
u'collection.render_fields.itervalues()'
|
||||
_tmp1 = _lookup_attr(_lookup_attr(econtext['collection'], 'render_fields'), 'itervalues')()
|
||||
field = None
|
||||
(_tmp1, _tmp2, ) = repeat.insert('field', _tmp1)
|
||||
for field in _tmp1:
|
||||
_tmp2 = (_tmp2 - 1)
|
||||
u'field.label_text or collection.prettify(field.key)'
|
||||
_content = (_lookup_attr(field, 'label_text') or _lookup_attr(econtext['collection'], 'prettify')(_lookup_attr(field, 'key')))
|
||||
attrs = _attrs_4354016912
|
||||
u'_content'
|
||||
_write(u'<th>')
|
||||
_tmp3 = _content
|
||||
_tmp = _tmp3
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'</th>')
|
||||
if (_tmp2 == 0):
|
||||
break
|
||||
_write(' ')
|
||||
_write(u'\n </tr>\n </thead>\n ')
|
||||
attrs = _attrs_4354016720
|
||||
u'collection.rows'
|
||||
_write(u'<tbody>\n ')
|
||||
_tmp1 = _lookup_attr(econtext['collection'], 'rows')
|
||||
row = None
|
||||
(_tmp1, _tmp2, ) = repeat.insert('row', _tmp1)
|
||||
for row in _tmp1:
|
||||
_tmp2 = (_tmp2 - 1)
|
||||
u'collection._set_active(row)'
|
||||
_write(u'')
|
||||
dummy = _lookup_attr(econtext['collection'], '_set_active')(row)
|
||||
attrs = _attrs_4354017104
|
||||
u"ui-widget-${repeat.row.even and 'even' or 'odd'}"
|
||||
_write(u'<tr')
|
||||
_tmp3 = ('%s%s' % (u'ui-widget-', ((_lookup_attr(repeat.row, 'even') and 'even') or 'odd'), ))
|
||||
if (_tmp3 is _default):
|
||||
_tmp3 = None
|
||||
if ((_tmp3 is not None) and (_tmp3 is not False)):
|
||||
if (_tmp3.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp3 = unicode(_translate(_tmp3, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp3, unicode):
|
||||
_tmp3 = str(_tmp3)
|
||||
if ('&' in _tmp3):
|
||||
if (';' in _tmp3):
|
||||
_tmp3 = _re_amp.sub('&', _tmp3)
|
||||
else:
|
||||
_tmp3 = _tmp3.replace('&', '&')
|
||||
if ('<' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('<', '<')
|
||||
if ('>' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('>', '>')
|
||||
if ('"' in _tmp3):
|
||||
_tmp3 = _tmp3.replace('"', '"')
|
||||
_write(((' class="' + _tmp3) + '"'))
|
||||
u"''"
|
||||
_write(u'>\n ')
|
||||
_default.value = default = ''
|
||||
u'collection.render_fields.itervalues()'
|
||||
_tmp3 = _lookup_attr(_lookup_attr(econtext['collection'], 'render_fields'), 'itervalues')()
|
||||
field = None
|
||||
(_tmp3, _tmp4, ) = repeat.insert('field', _tmp3)
|
||||
for field in _tmp3:
|
||||
_tmp4 = (_tmp4 - 1)
|
||||
u'field.render_readonly()'
|
||||
_content = _lookup_attr(field, 'render_readonly')()
|
||||
attrs = _attrs_4354017296
|
||||
u'_content'
|
||||
_write(u'<td>')
|
||||
_tmp5 = _content
|
||||
_tmp = _tmp5
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
_write(_tmp)
|
||||
_write(u'</td>')
|
||||
if (_tmp4 == 0):
|
||||
break
|
||||
_write(' ')
|
||||
_write(u'\n </tr>\n ')
|
||||
if (_tmp2 == 0):
|
||||
break
|
||||
_write(' ')
|
||||
_write(u'\n </tbody>\n</table>')
|
||||
return _out.getvalue()
|
||||
return render
|
||||
|
||||
__filename__ = '/Users/gawel/py/formalchemy_project/pyramid_formalchemy/pyramid_formalchemy/templates/forms/grid_readonly.pt'
|
||||
registry[(None, True, '1488bdb950901f8f258549439ef6661a49aae984')] = bind()
|
||||
@@ -16,7 +16,7 @@ class TemplateEngine(BaseTemplateEngine):
|
||||
name = name.strip('/')
|
||||
if not name.endswith('.pt'):
|
||||
name = '%s.pt' % name
|
||||
renderer = 'fa.jquery:templates/forms/%s' % name
|
||||
renderer = 'pyramid_formalchemy:templates/forms/%s' % name
|
||||
kwargs.update(dict(
|
||||
fatypes=fatypes,
|
||||
))
|
||||
|
||||
@@ -14,6 +14,7 @@ from pyramid.renderers import get_renderer
|
||||
from pyramid.response import Response
|
||||
from pyramid import httpexceptions as exc
|
||||
from pyramid.exceptions import NotFound
|
||||
from pyramid_formalchemy.utils import TemplateEngine
|
||||
|
||||
try:
|
||||
from formalchemy.ext.couchdb import Document
|
||||
@@ -39,7 +40,7 @@ class Session(object):
|
||||
class ModelView(object):
|
||||
"""A RESTful view bound to a model"""
|
||||
|
||||
engine = prefix_name = None
|
||||
engine = TemplateEngine()
|
||||
pager_args = dict(link_attr={'class': 'ui-pager-link ui-state-default ui-corner-all'},
|
||||
curpage_attr={'class': 'ui-pager-curpage ui-state-highlight ui-corner-all'})
|
||||
|
||||
|
||||
@@ -1,2 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pyramid_formalchemy.utils import TemplateEngine
|
||||
from pyramidapp import models
|
||||
from formalchemy import Grid, FieldSet
|
||||
from formalchemy import config
|
||||
|
||||
config.engine = TemplateEngine()
|
||||
|
||||
MyModel = FieldSet(models.MyModel)
|
||||
|
||||
GridMyModel = Grid(models.MyModel)
|
||||
|
||||
|
||||
@@ -0,0 +1,298 @@
|
||||
registry = dict(version=0)
|
||||
def bind():
|
||||
from cPickle import loads as _loads
|
||||
_lookup_attr = _loads('cchameleon.core.codegen\nlookup_attr\np1\n.')
|
||||
_attrs_4356044944 = _loads('(dp1\n.')
|
||||
_attrs_4356017808 = _loads('(dp1\n.')
|
||||
_re_amp = _loads("cre\n_compile\np1\n(S'&(?!([A-Za-z]+|#[0-9]+);)'\np2\nI0\ntRp3\n.")
|
||||
_attrs_4356015888 = _loads('(dp1\n.')
|
||||
_attrs_4356045392 = _loads('(dp1\nVhref\np2\nVhttp://docs.pylonshq.com/pyramid/dev/#sample-applications\np3\ns.')
|
||||
_attrs_4356044880 = _loads('(dp1\nVhref\np2\nVhttp://docs.pylonshq.com/pyramid/dev/#tutorials\np3\ns.')
|
||||
_attrs_4356045712 = _loads('(dp1\n.')
|
||||
_attrs_4356043152 = _loads('(dp1\nVid\np2\nVright\np3\nsVclass\np4\nValign-left\np5\ns.')
|
||||
_init_stream = _loads('cchameleon.core.generation\ninitialize_stream\np1\n.')
|
||||
_attrs_4356045136 = _loads('(dp1\nVhref\np2\nVhttp://docs.pylonshq.com/pyramid/dev/#change-history\np3\ns.')
|
||||
_attrs_4356045456 = _loads('(dp1\n.')
|
||||
_attrs_4356044624 = _loads('(dp1\nVhref\np2\nVhttp://docs.pylonshq.com/pyramid/dev/#api-documentation\np3\ns.')
|
||||
_attrs_4356017680 = _loads('(dp1\nVclass\np2\nVapp-name\np3\ns.')
|
||||
_attrs_4356017360 = _loads('(dp1\nVid\np2\nVbottom\np3\ns.')
|
||||
_attrs_4356016080 = _loads('(dp1\nVcontent\np2\nVpyramid web application\np3\nsVname\np4\nVdescription\np5\ns.')
|
||||
_attrs_4356016272 = _loads('(dp1\nVmedia\np2\nVscreen\np3\nsVcharset\np4\nVutf-8\np5\nsVhref\np6\nVhttp://fonts.googleapis.com/css?family=Neuton&subset=latin\np7\nsVrel\np8\nVstylesheet\np9\nsVtype\np10\nVtext/css\np11\ns.')
|
||||
_attrs_4356045200 = _loads('(dp1\n.')
|
||||
_attrs_4356043280 = _loads('(dp1\nVname\np2\nVq\nsVvalue\np3\nV\nsVtype\np4\nVtext\np5\nsVid\np6\nVq\ns.')
|
||||
_attrs_4356017296 = _loads('(dp1\nVclass\np2\nVmiddle align-center\np3\ns.')
|
||||
_attrs_4356016144 = _loads("(dp1\nVhref\np2\nV${request.static_url('pyramidapp:static/favicon.ico')}\np3\nsVrel\np4\nVshortcut icon\np5\ns.")
|
||||
_attrs_4356043920 = _loads('(dp1\n.')
|
||||
_attrs_4356016848 = _loads('(dp1\nVid\np2\nVmiddle\np3\ns.')
|
||||
_attrs_4356017936 = _loads('(dp1\nVclass\np2\nVbottom\np3\ns.')
|
||||
_attrs_4356015504 = _loads('(dp1\n.')
|
||||
_attrs_4356043408 = _loads('(dp1\nVtype\np2\nVsubmit\np3\nsVid\np4\nVx\nsVvalue\np5\nVGo\np6\ns.')
|
||||
_init_default = _loads('cchameleon.core.generation\ninitialize_default\np1\n.')
|
||||
_attrs_4356017488 = _loads('(dp1\nVclass\np2\nVapp-welcome\np3\ns.')
|
||||
_attrs_4356017168 = _loads("(dp1\nVsrc\np2\nV${request.static_url('pyramidapp:static/pyramid.png')}\np3\nsVheight\np4\nV169\np5\nsVwidth\np6\nV750\np7\nsValt\np8\nVpyramid\np9\ns.")
|
||||
_init_tal = _loads('cchameleon.core.generation\ninitialize_tal\np1\n.')
|
||||
_attrs_4356016784 = _loads('(dp1\nVclass\np2\nVtop align-center\np3\ns.')
|
||||
_attrs_4356045904 = _loads('(dp1\nVhref\np2\nVirc://irc.freenode.net#pyramid\np3\ns.')
|
||||
_attrs_4356043088 = _loads('(dp1\nVaction\np2\nVhttp://docs.pylonshq.com/pyramid/dev/search.html\np3\nsVmethod\np4\nVget\np5\ns.')
|
||||
_attrs_4356044112 = _loads('(dp1\nVhref\np2\nVhttp://pylonshq.com\np3\ns.')
|
||||
_attrs_4356043600 = _loads('(dp1\n.')
|
||||
_attrs_4356045648 = _loads('(dp1\nVhref\np2\nVhttp://docs.pylonshq.com/pyramid/dev/#support-and-development\np3\ns.')
|
||||
_attrs_4356043728 = _loads('(dp1\nVclass\np2\nVlinks\np3\ns.')
|
||||
_attrs_4356018128 = _loads('(dp1\nVid\np2\nVleft\np3\nsVclass\np4\nValign-right\np5\ns.')
|
||||
_attrs_4356017552 = _loads('(dp1\nVid\np2\nVfooter\np3\ns.')
|
||||
_attrs_4356044176 = _loads('(dp1\n.')
|
||||
_attrs_4356044432 = _loads('(dp1\n.')
|
||||
_attrs_4356016336 = _loads('(dp1\nVmedia\np2\nVscreen\np3\nsVcharset\np4\nVutf-8\np5\nsVhref\np6\nVhttp://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&subset=latin\np7\nsVrel\np8\nVstylesheet\np9\nsVtype\np10\nVtext/css\np11\ns.')
|
||||
_attrs_4356015952 = _loads('(dp1\nVcontent\np2\nVtext/html;charset=UTF-8\np3\nsVhttp-equiv\np4\nVContent-Type\np5\ns.')
|
||||
_attrs_4356042960 = _loads('(dp1\n.')
|
||||
_attrs_4356016528 = _loads('(dp1\nVid\np2\nVwrap\np3\ns.')
|
||||
_attrs_4356015696 = _loads('(dp1\n.')
|
||||
_init_scope = _loads('cchameleon.core.utils\necontext\np1\n.')
|
||||
_attrs_4356016208 = _loads("(dp1\nVmedia\np2\nVscreen\np3\nsVcharset\np4\nVutf-8\np5\nsVhref\np6\nV${request.static_url('pyramidapp:static/pylons.css')}\np7\nsVrel\np8\nVstylesheet\np9\nsVtype\np10\nVtext/css\np11\ns.")
|
||||
_attrs_4356044368 = _loads('(dp1\nVhref\np2\nVhttp://docs.pylonshq.com/pyramid/dev/#narrative-documentation\np3\ns.')
|
||||
_attrs_4356044688 = _loads('(dp1\n.')
|
||||
_attrs_4356016656 = _loads('(dp1\nVid\np2\nVtop\np3\ns.')
|
||||
_attrs_4356015760 = _loads('(dp1\nVxmlns\np2\nVhttp://www.w3.org/1999/xhtml\np3\nsVxml:lang\np4\nVen\np5\ns.')
|
||||
_attrs_4356043792 = _loads('(dp1\nVclass\np2\nVfooter\np3\ns.')
|
||||
_attrs_4356016016 = _loads('(dp1\nVcontent\np2\nVpython web application\np3\nsVname\np4\nVkeywords\np5\ns.')
|
||||
_attrs_4356016976 = _loads('(dp1\n.')
|
||||
def render(econtext, rcontext=None):
|
||||
macros = econtext.get('macros')
|
||||
_translate = econtext.get('_translate')
|
||||
_slots = econtext.get('_slots')
|
||||
target_language = econtext.get('target_language')
|
||||
u'_init_stream()'
|
||||
(_out, _write, ) = _init_stream()
|
||||
u'_init_tal()'
|
||||
(_attributes, repeat, ) = _init_tal()
|
||||
u'_init_default()'
|
||||
_default = _init_default()
|
||||
u'None'
|
||||
default = None
|
||||
u'None'
|
||||
_domain = None
|
||||
_write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n')
|
||||
attrs = _attrs_4356015760
|
||||
_write(u'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\n')
|
||||
attrs = _attrs_4356015696
|
||||
_write(u'<head>\n\t')
|
||||
attrs = _attrs_4356015504
|
||||
_write(u'<title>The Pyramid Web Application Development Framework</title>\n\t')
|
||||
attrs = _attrs_4356015952
|
||||
_write(u'<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />\n\t')
|
||||
attrs = _attrs_4356016016
|
||||
_write(u'<meta name="keywords" content="python web application" />\n\t')
|
||||
attrs = _attrs_4356016080
|
||||
_write(u'<meta name="description" content="pyramid web application" />\n\t')
|
||||
attrs = _attrs_4356016144
|
||||
'join(value("request.static_url(\'pyramidapp:static/favicon.ico\')"),)'
|
||||
_write(u'<link rel="shortcut icon"')
|
||||
_tmp1 = _lookup_attr(econtext['request'], 'static_url')('pyramidapp:static/favicon.ico')
|
||||
if (_tmp1 is _default):
|
||||
_tmp1 = u"${request.static_url('pyramidapp:static/favicon.ico')}"
|
||||
if ((_tmp1 is not None) and (_tmp1 is not False)):
|
||||
if (_tmp1.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp1 = unicode(_translate(_tmp1, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp1, unicode):
|
||||
_tmp1 = str(_tmp1)
|
||||
if ('&' in _tmp1):
|
||||
if (';' in _tmp1):
|
||||
_tmp1 = _re_amp.sub('&', _tmp1)
|
||||
else:
|
||||
_tmp1 = _tmp1.replace('&', '&')
|
||||
if ('<' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('<', '<')
|
||||
if ('>' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('>', '>')
|
||||
if ('"' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('"', '"')
|
||||
_write(((' href="' + _tmp1) + '"'))
|
||||
_write(u' />\n\t')
|
||||
attrs = _attrs_4356016208
|
||||
'join(value("request.static_url(\'pyramidapp:static/pylons.css\')"),)'
|
||||
_write(u'<link rel="stylesheet"')
|
||||
_tmp1 = _lookup_attr(econtext['request'], 'static_url')('pyramidapp:static/pylons.css')
|
||||
if (_tmp1 is _default):
|
||||
_tmp1 = u"${request.static_url('pyramidapp:static/pylons.css')}"
|
||||
if ((_tmp1 is not None) and (_tmp1 is not False)):
|
||||
if (_tmp1.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp1 = unicode(_translate(_tmp1, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp1, unicode):
|
||||
_tmp1 = str(_tmp1)
|
||||
if ('&' in _tmp1):
|
||||
if (';' in _tmp1):
|
||||
_tmp1 = _re_amp.sub('&', _tmp1)
|
||||
else:
|
||||
_tmp1 = _tmp1.replace('&', '&')
|
||||
if ('<' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('<', '<')
|
||||
if ('>' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('>', '>')
|
||||
if ('"' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('"', '"')
|
||||
_write(((' href="' + _tmp1) + '"'))
|
||||
_write(u' type="text/css" media="screen" charset="utf-8" />\n\t')
|
||||
attrs = _attrs_4356016272
|
||||
_write(u'<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Neuton&subset=latin" type="text/css" media="screen" charset="utf-8" />\n\t')
|
||||
attrs = _attrs_4356016336
|
||||
u"request.static_url('pyramidapp:static/ie6.css')"
|
||||
_write(u'<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&subset=latin" type="text/css" media="screen" charset="utf-8" />\n\t<!--[if lte IE 6]>\n\t<link rel="stylesheet" href="')
|
||||
_tmp1 = _lookup_attr(econtext['request'], 'static_url')('pyramidapp:static/ie6.css')
|
||||
_tmp = _tmp1
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'" type="text/css" media="screen" charset="utf-8" />\n\t<![endif]-->\n</head>\n')
|
||||
attrs = _attrs_4356015888
|
||||
_write(u'<body>\n\t')
|
||||
attrs = _attrs_4356016528
|
||||
_write(u'<div id="wrap">\n\t\t')
|
||||
attrs = _attrs_4356016656
|
||||
_write(u'<div id="top">\n\t\t\t')
|
||||
attrs = _attrs_4356016784
|
||||
_write(u'<div class="top align-center">\n\t\t\t\t')
|
||||
attrs = _attrs_4356016976
|
||||
_write(u'<div>')
|
||||
attrs = _attrs_4356017168
|
||||
'join(value("request.static_url(\'pyramidapp:static/pyramid.png\')"),)'
|
||||
_write(u'<img')
|
||||
_tmp1 = _lookup_attr(econtext['request'], 'static_url')('pyramidapp:static/pyramid.png')
|
||||
if (_tmp1 is _default):
|
||||
_tmp1 = u"${request.static_url('pyramidapp:static/pyramid.png')}"
|
||||
if ((_tmp1 is not None) and (_tmp1 is not False)):
|
||||
if (_tmp1.__class__ not in (str, unicode, int, float, )):
|
||||
_tmp1 = unicode(_translate(_tmp1, domain=_domain, mapping=None, target_language=target_language, default=None))
|
||||
else:
|
||||
if not isinstance(_tmp1, unicode):
|
||||
_tmp1 = str(_tmp1)
|
||||
if ('&' in _tmp1):
|
||||
if (';' in _tmp1):
|
||||
_tmp1 = _re_amp.sub('&', _tmp1)
|
||||
else:
|
||||
_tmp1 = _tmp1.replace('&', '&')
|
||||
if ('<' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('<', '<')
|
||||
if ('>' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('>', '>')
|
||||
if ('"' in _tmp1):
|
||||
_tmp1 = _tmp1.replace('"', '"')
|
||||
_write(((' src="' + _tmp1) + '"'))
|
||||
_write(u' width="750" height="169" alt="pyramid" /></div>\n\t\t\t</div>\n\t\t</div>\n\t\t')
|
||||
attrs = _attrs_4356016848
|
||||
_write(u'<div id="middle">\n\t\t\t')
|
||||
attrs = _attrs_4356017296
|
||||
_write(u'<div class="middle align-center">\n\t\t\t\t')
|
||||
attrs = _attrs_4356017488
|
||||
_write(u'<p class="app-welcome">\n\t\t\t\t\tWelcome to ')
|
||||
attrs = _attrs_4356017680
|
||||
u'project'
|
||||
_write(u'<span class="app-name">')
|
||||
_tmp1 = econtext['project']
|
||||
_tmp = _tmp1
|
||||
if (_tmp.__class__ not in (str, unicode, int, float, )):
|
||||
try:
|
||||
_tmp = _tmp.__html__
|
||||
except:
|
||||
_tmp = _translate(_tmp, domain=_domain, mapping=None, target_language=target_language, default=None)
|
||||
else:
|
||||
_tmp = _tmp()
|
||||
_write(_tmp)
|
||||
_tmp = None
|
||||
if (_tmp is not None):
|
||||
if not isinstance(_tmp, unicode):
|
||||
_tmp = str(_tmp)
|
||||
if ('&' in _tmp):
|
||||
if (';' in _tmp):
|
||||
_tmp = _re_amp.sub('&', _tmp)
|
||||
else:
|
||||
_tmp = _tmp.replace('&', '&')
|
||||
if ('<' in _tmp):
|
||||
_tmp = _tmp.replace('<', '<')
|
||||
if ('>' in _tmp):
|
||||
_tmp = _tmp.replace('>', '>')
|
||||
_write(_tmp)
|
||||
_write(u'</span>, an application generated by')
|
||||
attrs = _attrs_4356017808
|
||||
_write(u'<br />\n\t\t\t\t\tthe Pyramid web application development framework.\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</div>\n\t\t')
|
||||
attrs = _attrs_4356017360
|
||||
_write(u'<div id="bottom">\n\t\t\t')
|
||||
attrs = _attrs_4356017936
|
||||
_write(u'<div class="bottom">\n\t\t\t\t')
|
||||
attrs = _attrs_4356018128
|
||||
_write(u'<div id="left" class="align-right">\n\t\t\t\t\t')
|
||||
attrs = _attrs_4356042960
|
||||
_write(u'<h2>Search documentation</h2>\n\t\t\t\t\t')
|
||||
attrs = _attrs_4356043088
|
||||
_write(u'<form method="get" action="http://docs.pylonshq.com/pyramid/dev/search.html">\n\t\t \t\t\t')
|
||||
attrs = _attrs_4356043280
|
||||
_write(u'<input type="text" id="q" name="q" value="" />\n\t\t \t\t\t')
|
||||
attrs = _attrs_4356043408
|
||||
_write(u'<input type="submit" id="x" value="Go" />\n\t\t \t\t\t</form>\n\t\t\t\t</div>\n\t\t\t\t')
|
||||
attrs = _attrs_4356043152
|
||||
_write(u'<div id="right" class="align-left">\n\t\t\t\t\t')
|
||||
attrs = _attrs_4356043600
|
||||
_write(u'<h2>Pyramid links</h2>\n\t\t\t\t\t')
|
||||
attrs = _attrs_4356043728
|
||||
_write(u'<ul class="links">\n\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356043920
|
||||
_write(u'<li>\n\t\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356044112
|
||||
_write(u'<a href="http://pylonshq.com">Pylons Website</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356044176
|
||||
_write(u'<li>\n\t\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356044368
|
||||
_write(u'<a href="http://docs.pylonshq.com/pyramid/dev/#narrative-documentation">Narrative Documentation</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356044432
|
||||
_write(u'<li>\n\t\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356044624
|
||||
_write(u'<a href="http://docs.pylonshq.com/pyramid/dev/#api-documentation">API Documentation</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356044688
|
||||
_write(u'<li>\n\t\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356044880
|
||||
_write(u'<a href="http://docs.pylonshq.com/pyramid/dev/#tutorials">Tutorials</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356044944
|
||||
_write(u'<li>\n\t\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356045136
|
||||
_write(u'<a href="http://docs.pylonshq.com/pyramid/dev/#change-history">Change History</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356045200
|
||||
_write(u'<li>\n\t\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356045392
|
||||
_write(u'<a href="http://docs.pylonshq.com/pyramid/dev/#sample-applications">Sample Applications</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356045456
|
||||
_write(u'<li>\n\t\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356045648
|
||||
_write(u'<a href="http://docs.pylonshq.com/pyramid/dev/#support-and-development">Support and Development</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356045712
|
||||
_write(u'<li>\n\t\t\t\t\t\t\t')
|
||||
attrs = _attrs_4356045904
|
||||
_write(u'<a href="irc://irc.freenode.net#pyramid">IRC Channel</a>\n\t\t\t\t\t\t</li>\n\t\t \t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t')
|
||||
attrs = _attrs_4356017552
|
||||
_write(u'<div id="footer">\n\t\t')
|
||||
attrs = _attrs_4356043792
|
||||
_write(u'<div class="footer">\xa9 Copyright 2008-2011, Agendaless Consulting.</div>\n\t</div>\n</body>\n</html>')
|
||||
return _out.getvalue()
|
||||
return render
|
||||
|
||||
__filename__ = '/Users/gawel/py/formalchemy_project/pyramid_formalchemy/pyramidapp/pyramidapp/templates/mytemplate.pt'
|
||||
registry[(None, True, '1488bdb950901f8f258549439ef6661a49aae984')] = bind()
|
||||
@@ -29,8 +29,10 @@ class TestController(unittest.TestCase):
|
||||
def tearDown(self):
|
||||
self.config.end()
|
||||
|
||||
|
||||
def test_index(self):
|
||||
resp = self.app.get('/')
|
||||
|
||||
def test_crud(self):
|
||||
# index
|
||||
resp = self.app.get('/admin/')
|
||||
resp.mustcontain('/admin/Foo')
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
from pyramidapp.models import DBSession
|
||||
from pyramidapp.models import MyModel
|
||||
from pyramidapp import forms
|
||||
|
||||
def my_view(request):
|
||||
dbsession = DBSession()
|
||||
root = dbsession.query(MyModel).filter(MyModel.name==u'root').first()
|
||||
fs = forms.GridMyModel.bind([root]).render()
|
||||
return {'root':root, 'project':'pyramidapp'}
|
||||
|
||||
@@ -6,11 +6,11 @@ here = os.path.abspath(os.path.dirname(__file__))
|
||||
README = open(os.path.join(here, 'README.txt')).read()
|
||||
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
|
||||
|
||||
requires = ['pyramid>=1.0', 'WebError', 'FormAlchemy']
|
||||
requires = ['pyramid>=1.0', 'WebError', 'FormAlchemy>=1.3.5']
|
||||
|
||||
setup(name='pyramid_formalchemy',
|
||||
version='0.0',
|
||||
description='pyramid_formalchemy',
|
||||
version='0.1',
|
||||
description='FormAlchemy plugins and helpers for Pyramid',
|
||||
long_description=README + '\n\n' + CHANGES,
|
||||
classifiers=[
|
||||
"Programming Language :: Python",
|
||||
@@ -20,7 +20,7 @@ setup(name='pyramid_formalchemy',
|
||||
],
|
||||
author='Gael Pasgrimaud',
|
||||
author_email='gael@gawel.org',
|
||||
url='',
|
||||
url='http://docs.formalchemy.org/pyramid_formalchemy/',
|
||||
keywords='web pyramid pylons formalchemy',
|
||||
packages=find_packages(exclude=['pyramidapp']),
|
||||
include_package_data=True,
|
||||
|
||||
Reference in New Issue
Block a user