From: shelon23 <she...@di...> - 2010-01-23 22:33:30
|
Hi, I am trying to create a custom AT contenttype in Plone 3.3.3 which contains an ImageField called 'memberimage'. According to http://plone.org/documentation/manual/developer-manual/archetypes/fields/fields-reference, the ImageField allows to pass a parameter 'sizes' to it, so that later on an image should be accessible in different sizes using the URLs obj/memberimage, obj/memberimage_thumb, etc. (as specified by 'sizes'). This doesn't work though (obj/memberimage works but obj/memberimage_mini doesn't) based on the field definition which was generated by paster, and I changed the storage to AttributeStorage (as is indicated in the documentation) like in atapi.ImageField( 'memberimage', # storage=atapi.AnnotationStorage(), # paster version storage=atapi.AttributeStorage(), # results in "max recursion depth exceeded" error widget=atapi.ImageWidget( label=_(u"New Field"), description=_(u"Field description"), ), validators=('isNonEmptyFile'), original_size=(600,600), sizes={ 'mini' : (80,80), 'normal' : (200,200), 'big' : (300,300), 'maxi' : (500,500)}, ), This results in an exception when I try to access the object: - __traceback_info__: ('memberimage', <TTMemberImage at tt_member_image.2010-01-23.8138248069>, {'field': <Field memberimage(image:rw)>}) Module Products.Archetypes.Storage, line 96, in get Module Products.Archetypes.utils, line 808, in shasattr Module Products.Archetypes.fieldproperty, line 101, in __get__ Module Products.Archetypes.Field, line 997, in get Module Products.Archetypes.Field, line 709, in get - __traceback_info__: ('memberimage', <TTMemberImage at tt_member_image.2010-01-23.8138248069>, {'field': <Field memberimage(image:rw)>}) RuntimeError: maximum recursion depth exceeded How can I work around this? How do I get the image rescaling to work for an ImageField (not an ATImage)? Thanks for your help! shelon -- View this message in context: http://n2.nabble.com/ImageField-AttributeStorage-and-Max-Recursion-Depth-Error-tp4447134p4447134.html Sent from the Archetypes mailing list archive at Nabble.com. |