def post(self): form = RegistrationForm(request.form) if form.validate(): response = self.rest.postForm( form.toDict() ) data = json.loads(response) flash("Account successfully created!", "success") return redirect(url_for('login'))
def userNewForm(): form = RegistrationForm(request.form) return jsonify(form = form.toDict())