Re: Viele Felder mit deforms

Andreas Jung <[email protected]>
Newsgroups gmane.comp.web.zope.german
Organization ZOPYX Ltd & Co. KG
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Probier Dein Glück besser auf der Pylons Liste - Deforms ist sicherlich
nicht sehr weit verbereitet. An "vielen" Feldern kann es sicherlich
nicht liegen. Ich arbeitete gerade an einer App wo wir irgendwas in der
Größenordnung von 60 verschiedenen Feldern und Customwidgets in Zope 2
zu tun haben - aber wir haben andere Probleme mit Colander :)

Andreas

Vladislav Vorobiev wrote:
> Hallo,
> 
> wenn ich viele Felder mit deform darstellen möchte (ab 20) bekomme ich
> ein Fehler:
> 
>   Module zope.tales.tales, line 696, in evaluate
>    - URL: /home/p27b/var/zeoi1/Products/VVshop/browser/deform_test.pt
>    - Line 20, Column 0
>    - Expression: <PathExpr standard:u'view/form_view'>
>    - Names:
>       {'args': (),
>        'context': <Shop at /kundenseiten/gossrushop/shop>,
>        'default': <object object at 0x7f44f412ab40>,
>        'loop': {},
>        'nothing': None,
>        'options': {},
>        'repeat': {},
>        'request': <HTTPRequest,
> URL=http://check.gossrushop.vavmaster.de/test_deform>,
>        'template':
> <zope.browserpage.viewpagetemplatefile.ViewPageTemplateFile object at
> 0x71fd8d0>,
>        'view': <Products.Five.metaclass.DEformTest object at 0x736c210>,
>        'views': <zope.browserpage.viewpagetemplatefile.ViewMapper
> object at 0x7365ed0>}
>   Module zope.tales.expressions, line 217, in __call__
>   Module zope.tales.expressions, line 211, in _eval
>   Module Products.VVshop.browser.browser_deform, line 379, in form_view
>   Module deform.field, line 419, in render
>   Module deform.field, line 394, in serialize
>   Module deform.widget, line 791, in serialize
>   Module deform.template, line 103, in __call__
>   Module chameleon.core.template, line 104, in __call__
>   Module chameleon.core.template, line 402, in render
>   Module chameleon.zpt.template, line 17, in render
>   Module chameleon.core.template, line 229, in render
>   Module chameleon.core.template, line 382, in cook_and_render
>   Module chameleon.core.template, line 217, in cook_and_render
>    - __traceback_info__: (<PageTemplateFile
> /home/p27b/usr/lib/python2.7/site-packages/deform-0.9-py2.7.egg/deform/templates/form.pt>,)
>   Module chameleon_2d8479fcee0b551658723a3d1c0b78c852200efc, line 307, in render
>   Module deform.template, line 103, in __call__
>   Module chameleon.core.template, line 104, in __call__
>   Module chameleon.core.template, line 402, in render
>   Module chameleon.zpt.template, line 17, in render
>   Module chameleon.core.template, line 229, in render
>   Module chameleon.core.template, line 382, in cook_and_render
>   Module chameleon.core.template, line 217, in cook_and_render
>    - __traceback_info__: (<PageTemplateFile
> /home/p27b/usr/lib/python2.7/site-packages/deform-0.9-py2.7.egg/deform/templates/mapping_item.pt>,)
>   Module chameleon_86609e67614644096f5b299250421c97eec7612e, line 213, in render
>   Module deform.field, line 394, in serialize
>   Module deform.widget, line 937, in serialize
> RuntimeError: Caught exception rendering template.
>  - Expression: ``rndr(tmpl,field=f,cstruct=cstruct.get(f.name, null))``
>  - Filename:   /home/p27b/usr/lib/python2.7/site-packages/deform-0.9-py2.7.egg/deform/templates/form.pt
>  - Arguments:  field: <Form - at 0x736c6d0>
>                cstruct: {...} (60)
>                template: <PageTemplateFile - at 0x7372710>
>                xincludes: <XIncludes - at 0x7372790>
>                macros: <Macros - at 0x7a7d250>
>                null: <_null - at 0x70a6ed0>
> 
> RuntimeError: Caught exception rendering template.
>  - Expression: ``field.serialize(cstruct)``
>  - Filename:   /home/p27b/usr/lib/python2.7/site-packages/deform-0.9-py2.7.egg/deform/templates/mapping_item.pt
>  - Arguments:  field: <Field - at 0x736cc50>
>                cstruct: <_null - at 0x70a6ed0>
>                template: <PageTemplateFile - at 0x7a7db50>
>                xincludes: <XIncludes - at 0x7a89910>
>                macros: <Macros - at 0x7a89290>
> 
> IndexError: list index out of range
> 
> Vieleicht hat jemand sowas schon mal gesehen.
> 
> Der code sieht so  aus:
> 
> class MySchema(MappingSchema):
> 
>     name = SchemaNode(String(),
>                       description = LONG_DESC)
>     title = SchemaNode(String(),
>                       description = LONG_DESC)
>     root = SchemaNode(String(),
>                       description = LONG_DESC)
>    .....viele viele felde
> 
> 
> ......
> class DEformTest(BrowserPage):
>     def form_view(obj):
>         myform = Form(schema, buttons=('submit','clear'))
>         return myform.render()
>     __call__ = ViewPageTemplateFile('deform_test.pt')
> 
> 
> Mit wenigen Feldern funktioniert es.
> 


- -- 
ZOPYX Limited           | zopyx group
Charlottenstr. 37/1     | The full-service network for Zope & Plone
D-72070 Tübingen        | Produce & Publish
www.zopyx.com           | www.produce-and-publish.com
- ------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJNy2YHAAoJEADcfz7u4AZjCe4Lv3biSvJE712X31l63mVTXBOv
Lgx66sH9+LzD2dWj9dH8n40R7Gi962YLzW9HUSa49K/LJL5bn2M7apCwuQMjppYG
BL/sFjPneLLVBiTEPta0gDhZiTMXM8lkj06Z5U/VJwImLs8DH8v0Md+FjRDWq8t/
l8LNDXL5aPpZ+280lZ3Ba8SZiKQBrDqwd/+2eH3qNaeJJDq5gU67qvMiYGryqQyK
dITmeU9SD5AK6IKfkZTp7x6TJQuICEkqDmKLvuiuep6UZhmCT6qlc+k5KiKefvhV
ue1VIeaQuZD244U2de9Q9lblPm8eZrAbhs4D4xK+jSUn7P4gCM9kfD+vrBsnaF1c
8OVBobboN2x0+0zwY0vrwlPjgNfpX4XoQgPf+ibQDxd2cAjugOBTdctrk3i9jNlq
KW0J5PIKI6Ctf7zMzEc7sy5pH1sa56coMvOOAMwEGg915+XBaw4B1JWwNlModUld
iI+XuexsPE2+z85bExjH5FgtZcm6cwI=
=ushG
-----END PGP SIGNATURE-----



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lists.vcf (text/x-vcard, 316 B)
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[email protected]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.