문제

In Archetypes, in order to move a field from a fieldset (or schemata) to another, we can do the following:

schema['creators'].schemata = 'default'

However, I'm not achieving the same using Dexterity. I've tried using form hints. Ex:

form.fieldset('default',
    fields=['creators']
 )

I notice that it doesn't work because the field "creators" is unknown at this time. (The ownership behavior wasn't evaluated yet).

Nevertheless, with form hints, I can move from "default" to another (eg. "ownership").

myfile = NamedFile(title=_(u"A file"))
form.fieldset('ownership', fields=['myfile'])

How can I do that? Writing my own behavior?

Thx!

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top