5 May 12:53
ImageField
Good Day
I'm trying to resize picture. My schema contains :
ImageField('poster',
required = 0,
languageIndependent=1,
original_size = (600,600),
sizes={ 'mini' : (80,80),
'normal' : (200,200),
'big' : (300,300),
'maxi' : (500,500)},
widget = ImageWidget(label= "Poster",
label_msgid = "label_poster",
description = "Upload a poster. It will be a
description_msgid = "desc_poster",
i18n_domain = "ATVideo")
),
In fact i'd take ATAudio product and modified it slightly.
In my portlet :
<img tal:replace="structure python:
context.getField('poster').tag(context, scale='mini')" />
And this results "Insufficient Privileges". The log:
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 41, in call_object
(Continue reading)
> Unauthorized: Your user account does not have the required permission.
> Access to 'tag' of (Field poster(image:rw)) denied. Your user
> account, admin, exists at /xdf/acl_users. Access requires one of the
> following roles: ['Manager']. Your roles in this context are
> ['Authenticated'].
Have you tried to just access your picture (without calling "tag")?
Does that work? It apparently fails before even trying to scale.
Reinout
RSS Feed