I have added a few attributes to the User class and changed the register_widgets and register_controllers accordingly.

I get the following error when I try to edit the user parameters and call update_user :
----------------------
2007-01-04 12:22:09,890 turbogears.identity INFO Identity is available...
2007-01-04 12:22:09,943 cherrypy.msg INFO HTTP: Page handler: <bound method UserRegistration.update_user of <mm.mm_register_controllers.UserRegistration object at 0xb737674c>>
Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 105, in _run
   self.main()
File "/usr/local/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 254, in main
   body = page_handler(*virtual_path, **self.params)
TypeError: update_user() takes at least 7 non-keyword arguments (5 given)
------------------------
In the function definition, I have added 2 parameters so it becomes :
def update_user(self, email, old_password, password1, password2, option1, option2, user_name=None):

option1 and option2 are 2 widgets.TextField in the ExistingUserFields class.

Why is there this TypeError ? Why the 'email' or 'old_password' params are different than the 'option1' or 'option2' params ??

If I change the function definition to
def update_user(self, email, old_password, password1, password2, user_name=None, **kw):
I get option1 and options2 as elements of kw...


--~--~---------~--~----~------------~-------~--~----~
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