[Plone-IT] quale import scrivere per usare la funzione "test"

Vito Falco vitofalco a gmail.com
Lun 29 Set 2008 11:47:20 UTC


Ciao,
sto smanettando di copia/incolla (^____^) per scrivere una view molto simile
al portlet degli eventi.
Quindi mi trovo difronte a questo codice:

...

<div metal:define-macro="text-field-view"
                 id="parent-fieldname-text" class="stx"
                 tal:define="kss_class python:getKssClasses('text',
                             templateId=templateId,
macro='text-field-view');
                             text here/getText|nothing;
                 tal:condition="text"
                 tal:attributes="class python:test(here.Format() in
('text/structured',
                                                       'text/x-rst', ),
'stx' + kss_class, 'plain' + kss_class)">
                <div metal:define-slot="inside" tal:replace="structure
text">The body</div>
    </div>
...

Quale import devo fare nel mio pagetemplate per utilizzare la funzione di
test?
Infatti ora mi restituisce il seguente errore al rendering della pagina:

Exception Type      NameError
> Exception Value     name 'test' is not defined
>

Grazie
Vito


-- 
"Design is the method of putting form and content together. Design, just as
art, has multiple definitions; there is no single definition. Design can be
art. Design can be aesthetics. Design is so simple, that's why it is so
complicated." by Paul Rand
-------------- parte successiva --------------
Un allegato HTML è stato rimosso...
URL: <http://lists.plone.org/pipermail/plone-plone-it/attachments/20080929/faa22abe/attachment.html>


Maggiori informazioni sulla lista Plone-IT