I'm getting it in my "add_user" view:
@app.route('/add_user', methods=['GET','POST'])
def add_user():
form = UserForm()
if form.validate_on_submit():
g.db.execute('insert into users (firstName,lastName,coName,email,comId,yelpURL,comments,password,revenue,profit,zipCode ) values (?,?,?,?,?,?,?,?,?,?,?)',
[request.form['firstName'], request.form['lastName'],request.form['coName'], request.form['email'], 0,
'NA', 'NA',request.form['password'],request.form['revenue'],request.form['profit'],coZip])
g.db.commit()
# flash('Thanks for signing up... let\'s find you a community')
user = User(request.form['email'], request.form['password'])
login_user(user, remember=True)
return redirect(url_for('com_flow'))
return render_template('add_user.html', form=form, linkMe=linkMe)
#add_user.html
<form class="form form-horizontal" method="post" role="form" enctype=multipart/form-data action>
{{ form.hidden_tag() }}
{{ wtf.form_errors(form, hiddens="only") }}
{{ wtf.form_field(form.email) }}
{{ wtf.form_field(form.password) }}
{{ wtf.form_field(form.firstName) }}
{{ wtf.form_field(form.lastName) }}
{{ wtf.form_field(form.coName) }}
<!-- <p><a href=# id="calculate">Click to validate Yelp</a></p> -->
{{ wtf.form_field(form.revenue) }}
{{ wtf.form_field(form.profit) }}
<button type="submit" class="btn btn-primary btn-lg btn-block">Submit</button>
</form>
Whenever I click submit, it goes to a 403 page with the message above... also the error doesn't appear in my error logs, only on the page.