parent
f52d98333e
commit
de094d4bed
4 changed files with 13 additions and 6 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import functools
|
||||
|
||||
from flask import (
|
||||
Blueprint, flash, g, redirect, render_template, request, session, url_for
|
||||
Blueprint, flash, g, redirect, render_template, request, session, url_for, current_app, abort
|
||||
)
|
||||
from werkzeug.security import check_password_hash, generate_password_hash
|
||||
|
||||
|
|
@ -11,6 +11,8 @@ bp = Blueprint('auth', __name__, url_prefix='/auth')
|
|||
|
||||
@bp.route('/register', methods=('GET', 'POST'))
|
||||
def register():
|
||||
if not current_app.config['REGISTER']:
|
||||
abort(403)
|
||||
if request.method == 'POST':
|
||||
username = request.form['username']
|
||||
password = request.form['password']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue