Hey Anand. Thanks for your reply. But I'm still getting error when I submit my form.
<type 'exceptions.TypeError'> at /users/ POST() takes no arguments (1 given) Thank you. -- Tomás A. Schertel ---------------------------------------------- Linux Registered User #304838 Arch Linux User http://www.archlinux-br.org/ ---------------------------------------------- On Tue, Oct 11, 2011 at 20:47, Anand Chitipothu <[email protected]>wrote: > 2011/10/12 Tomás Acauan Schertel <[email protected]>: > > Hi there. > > > > I'm having problems to make databasing work (sqlite). > > I have a class with this function on it: > > def POST(): > > i = web.input() > > db.insert('users', name=i.name, email=i.email, password=i.password, > > groups=i.groups[]) > > > > I can't even see the page. > > Browser says: > > > > serve.py", line 37 > > db.insert('users', name=i.name, email=i.email, password=i.password, > > groups=i.groups[]) > > > > ^ > > SyntaxError: invalid syntax > > > > What could be wrong? > > i.groups[] is not a valid python syntax. You need to do it like this: > > i = web.input(groups=[]) > db.insert('users', name=i.name, email=i.email, password=i.password, > groups=i.groups) > > Anand > > -- > You received this message because you are subscribed to the Google Groups > "web.py" 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/webpy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en.
