Additional sections
parent
a42dfe6110
commit
61b1573fe2
1 changed files with 10 additions and 3 deletions
|
|
@ -252,9 +252,9 @@ This decorator is checking that g.user has a value assigned to it, otherwise it
|
|||
# the session can't be modified as it's signed,
|
||||
# it's a safe place to store the user id
|
||||
session['user_id'] = user.id
|
||||
flash('Welcome %s' % user.name, INFO_MSG)
|
||||
flash('Welcome %s' % user.name)
|
||||
return redirect(url_for('user.home'))
|
||||
flash('Wrong email or password', ERROR_MSG)
|
||||
flash('Wrong email or password', 'error-message')
|
||||
return render_template("users/login.html", form=form)
|
||||
|
||||
@mod.route('/register/', methods=['GET', 'POST'])
|
||||
|
|
@ -388,7 +388,14 @@ now you can go in your root, activate your virtual env and run `python run.py` .
|
|||
* Running on http://127.0.0.1:5000/
|
||||
* Restarting with reloader
|
||||
|
||||
# Caching
|
||||
Open your web-browser at `http://127.0.0.1:5000/users/me/`, you should be redirected to the login page and see a link to the register page.
|
||||
|
||||
# Other good practices
|
||||
|
||||
## Caching
|
||||
|
||||
## Javascript's namespace
|
||||
|
||||
|
||||
# Setting up your web server
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue