Just tried changing database from sqlite to mysql and aI got this error:
<class '_mysql_exceptions.OperationalError'> at /users/
(1241, 'Operand should contain 1 column(s)')
I'm sending a form with few fields: name, email, password, an array...
<form action="/users/" method="post">
<fieldset style="width: 500px; height: 500px">
<legend>Informacoes pessoais:</legend>
<label for="name">Nome:</label>
<input type="text" name="name" /><br />
<label for="email">Email:</label>
<input type="text" name="email" /><br />
<label for="password">Senha:</label>
<input type="password" name="password" /><br /><br />
<fieldset style="width: 300px; height: 70px">
<legend>Informacoes pessoais:</legend>
<input type="checkbox" name="groups" value="administradores" />Administradores<br />
<input type="checkbox" name="groups" value="operadores" />Operadores<br />
<input type="checkbox" name="groups" value="usuarios" checked/>Usuários<br />
</fieldset>
<br/>
<br />
<input type="checkbox" name="is_active" value="1" />Ativo<br />
<input type="submit" value="Enviar" />
This is my code:
def POST(self):
i = web.input(groups=[])
db.insert("users", email = i.email, name =
i.name, password = i.password, groups = i.groups)
raise web.seeother('/users/')
Is there any thing wrong here?