08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Pyramid zope request
1. 2013-07-03 Europython Firenze pyramid_zope_request 1/7
pyramid_zope_request
Adam GROSZER
https://github.com/agroszer
https://github.com/zopefoundation/pyramid_zope_request
2. 2013-07-03 Europython Firenze pyramid_zope_request 2/7
pyramid_zope_request
There are some great ZTK packages around
A wrapper around a pyramid Request and
Response objects, so zope.publisher based
packages can be used with pyramid
Bare minimum attributes/methods implemented
http://docs.webob.org/en/latest/differences.html#i
d11
3. 2013-07-03 Europython Firenze pyramid_zope_request 3/7
pyramid_zope_request
PyramidPublisherRequest(zope.publisher.base.BaseR
equest):
●
form (incl. :list conversion)
●
environment
●
keys(), get() – no cookies
●
getURL()
●
annotations
All others mirrored from pyramid Request
4. 2013-07-03 Europython Firenze pyramid_zope_request 4/7
pyramid_zope_request
PyramidPublisherResponse
●
getHeader
●
setHeader / addHeader (incl. charset tweak)
●
getStatus / setStatus
● All others mirrored from pyramid
Response
5. 2013-07-03 Europython Firenze pyramid_zope_request 5/7
z3c.form example
As proof of concept, z3c.form works
class IMyLayer(
z3c.form.interfaces.IFormLayer,
IBrowserRequest):
pass
6. 2013-07-03 Europython Firenze pyramid_zope_request 6/7
z3c.form example
@pyramid_zope_request.PyramidToPublisher(IMyLayer)
@view_config(route_name='person',
attr='__call__',
renderer='person.pt')
class edit_person(z3c.form.form.EditForm):
fields = z3c.form.field.Fields(IPerson)
def __call__(self):
self.update()
return {}
7. 2013-07-03 Europython Firenze pyramid_zope_request 7/7
z3c.form example
Just better to use chameleon templates
person.pt:
...
<label tal:attributes="for widget.id"
tal:content="widget.label">
label
</label>
<input type="text" size="24" value=""
tal:replace="structure widget.render()"/>
...