Hi,
i want to write a form that adds a user. When pressing submit,i'm
running into an error, but i don't know where it is...

    @expose(template="web2.templates.adduser")
    # @identity.require(identity.in_group("admin")
    def adduser(name, passwd, group):
        print name
        print passwd
        print group
        b=User(user_name=name, password=passwd, group=group)
        raise redirect("/userlist")

    @expose(template="web2.templates.adduser")
    # @identity.require(identity.in_group("admin")
    def doit(self):
        return dict()
--------------------------------------------------------------------------------------------
<form Name="Add User" Method="post" Action="/adduser">
   <p>Name: <input name="name"></input></p>
   <p>Password: <input name="passwd"></input></p>
   <p>Group: <input name="group"></input></p>
   <p><input type="submit" value="submit"></input></p>
</form>
---------------------------------------------------------------------------------------------
Page handler: <bound method Root.adduser of <web2.controllers.Root
object at 0x88ff22c>>
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg/
cherrypy/_cphttptools.py", line 105, in _run
    self.main()
  File "/usr/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg/
cherrypy/_cphttptools.py", line 254, in main
    body = page_handler(*virtual_path, **self.params)
TypeError: adduser() got multiple values for keyword argument 'name'
--~--~---------~--~----~------------~-------~--~----~
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