I have a form with this widget list:

class UserBase(widgets.WidgetsList):
    groupcode = 
widgets.AutoCompleteField(search_controller="/admin/searchgroupcode",
                                          search_param="input",
                                          result_name="matches",
                                          validator=validators.NotEmpty())

Whenever I added that validator, CherryPy immediately stops with this backtrace:

  File "./start-lite.py", line 15, in <module>
    start()
  File 
"/usr/home/kirk/projects/daycos/branches/devel/Daycos/Lite/lite/commands.py", 
line 52, in start
    from lite.controllers import Root
  File 
"/usr/home/kirk/projects/daycos/branches/devel/Daycos/Lite/lite/controllers/__init__.py",
 line 2, in <module>
    from lite.controllers.root import Root
  File 
"/usr/home/kirk/projects/daycos/branches/devel/Daycos/Lite/lite/controllers/root.py",
 line 11, in <module>
    from lite.controllers.admin import AdminController
  File 
"/usr/home/kirk/projects/daycos/branches/devel/Daycos/Lite/lite/controllers/admin.py",
 line 14, in <module>
    class UserBase(widgets.WidgetsList):
  File 
"/usr/home/kirk/projects/daycos/branches/devel/Daycos/Lite/lite/controllers/admin.py",
 line 23, in UserBase
    validator=validators.NotEmpty())
  File 
"/usr/local/lib/python2.5/site-packages/TurboGears-1.0.7-py2.5.egg/turbogears/widgets/meta.py",
 line 171, in 
widget_init
    validator = generate_schema(self.validator, widgets)
  File 
"/usr/local/lib/python2.5/site-packages/TurboGears-1.0.7-py2.5.egg/turbogears/widgets/meta.py",
 line 277, in 
generate_schema
    schema = copy_schema(schema)
  File 
"/usr/local/lib/python2.5/site-packages/TurboGears-1.0.7-py2.5.egg/turbogears/widgets/meta.py",
 line 214, in 
copy_schema
    new_schema.pre_validators = schema.pre_validators[:]
AttributeError: 'NotEmpty' object has no attribute 'pre_validators'
2008-10-16 12:14:38,403 cherrypy.msg INFO ENGINE: SystemExit raised: shutting 
down autoreloader
2008-10-16 12:14:38,403 cherrypy.msg INFO HTTP: HTTP Server shut down
Identity shutting down
2008-10-16 12:14:38,405 cherrypy.msg INFO ENGINE: CherryPy shut down


I've Googled for what I thought were the appropriate terms but haven't been
able to find anything for this problem.  I *can* use validators.NotEmpty()
on other fields in the same class, just not this AutoCompleteField.
-- 
Kirk Strauser

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to