TurboGears widget errors

(2 comments)

I am making a small project with TurboGears and I am just loving the widgets and the identity framework. There are some rough spots, like the documentation, but luckily for the most pars you can just launch an ipython interpreter and use tab completion to look at what functions are available. But then I got this error:
Traceback (most recent call last):
File "./start-foo.py", line 23, in
from foo.controllers import Root
File "...Foo/foo/controllers.py", line 22, in
action="save_settings"
File "/var/lib/python-support/python2.5/turbogears/widgets/meta.py", line 169, in widget_init
validator = generate_schema(self.validator, widgets)
File "/var/lib/python-support/python2.5/turbogears/widgets/meta.py", line 277, in generate_schema
if widget.is_named:
AttributeError: type object 'SettingsFields' has no attribute 'is_named'

And I could not find any help on this. Luckily I found Lucas manual and by comparing the code I found that in this part of the code:
settings_form = widgets.TableForm(
fields=SettingsFields,
action="save_settings"
)

Instead of passing the whole SettingsFields class, an instance of it needs to be passed ( as in "fields=SettingsFields()," ). Cann't wait to see all the goodies they are making now in TG 2.0, but considering my experience, I will wait until they update the documentation for it before diving in.

Currently unrated

Comments

rwppmkzv 9 years, 4 months ago

<strong>rwppmkzv...</strong>

rwppmkzv...

Link | Reply

Buy percocet online no prescription. 9 years ago

<strong>Buy percocet online....</strong>

Description of percocet. Cheap percocet. Percocet vs. lortabs....

Link | Reply

New Comment

required

required (not published)

optional

Recent Posts

Archive

2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005

Categories

Authors

Feeds

RSS / Atom