def post(self): form = ContentForm(self.request.arguments) print form.text content = ContentsModel() content.text = form.text.data session.add(content) session.commit()
def post(self): form = RegisterForm(self.request.arguments) model = UserModel() if form.confirm.data == form.password.data and form.validate(): form2obj(form, model) session.add(model) session.commit() return self.redirect('/login') self.render('register.html', form=form)