mirror of
https://github.com/TrentSPalmer/flask_photo_scaling_app.git
synced 2025-02-18 13:40:55 -08:00
fix style app/auth/register.py
This commit is contained in:
parent
4cb734be40
commit
72a8b46375
@ -17,9 +17,15 @@ def register():
|
||||
return redirect(url_for('proute.index'))
|
||||
form = RegistrationForm()
|
||||
if form.validate_on_submit():
|
||||
db.engine.execute("SELECT setval('contributor_id_seq', (SELECT MAX(id) FROM contributor))")
|
||||
my_sql = "SELECT setval('contributor_id_seq', "
|
||||
my_sql += "(SELECT MAX(id) FROM contributor))"
|
||||
db.engine.execute(my_sql)
|
||||
db.session.commit()
|
||||
contributor = Contributor(name=form.username.data, num_photos=0, email=form.email.data)
|
||||
contributor = Contributor(
|
||||
name=form.username.data,
|
||||
num_photos=0,
|
||||
email=form.email.data,
|
||||
)
|
||||
contributor.set_password(form.password.data)
|
||||
db.session.add(contributor)
|
||||
db.session.commit()
|
||||
|
Loading…
x
Reference in New Issue
Block a user