What happened to OptionsWidget

38 views
Skip to first unread message

Annet

unread,
Aug 11, 2020, 4:16:10 AM8/11/20
to web2py-users
I coded a custom radio widget:

def inlineRadioOptions(field, value, **attributes):
   ...

    attr = OptionsWidget._attributes(field, {}, **attributes)
    attr['_class'] = attr.get('_class', 'web2py_radiowidget')

   ...

    return TAG[''](*opts, **attr)

After upgrading to web2py 20.x this no longer works.
I get an error on;

OptionsWidget

I guess the OptionsWidget has been replaced, the problem is
I cannot figure out by what.

I hope one of you knows,


Best,

Annet

villas

unread,
Aug 11, 2020, 12:37:31 PM8/11/20
to web2py-users
OptionsWidget is still in the code (see gluon/sqlhtml.py)
I guess you introduced a typo or something...

Annet

unread,
Aug 13, 2020, 5:47:26 AM8/13/20
to web2py-users
Hi,

Thanks for your reply. I didn't alter anything in the code,
however, I moved the widget to another module, in
which I forgot to import sqlhtml.py

You reply pointed me in that direction.

Best,

Annet
Reply all
Reply to author
Forward
0 new messages