thanks, i think that's it. I'm getting other errors now, but they are
occuring during user-creation.

On 23 Jan., 20:21, Barry Hart <[EMAIL PROTECTED]> wrote:
> Your adduser function needs 'self' as the first argument. That's probably the 
> reason for your problem.
>
> Barry
>
> ----- Original Message ----
> From: Hardy <[EMAIL PROTECTED]>
> To: TurboGears <[email protected]>
> Sent: Wednesday, January 23, 2008 1:55:30 PM
> Subject: [TurboGears] got multiple values for keyword argument
>
> 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'
>
>       
> ____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page.http://www.yahoo.com/r/hs
--~--~---------~--~----~------------~-------~--~----~
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