Skip to content

Commit

Permalink
Removed pokemon pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
tooxie committed Nov 22, 2013
1 parent e6061de commit 49d5dff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions blatt/www/app.py
Expand Up @@ -147,12 +147,14 @@ def login():

return render_template('login.html', form=login_form)


@app.route("/logout/")
def logout():
logout_user()

return render_template('logout.html')


@app.route('/signup/', methods=['GET', 'POST'])
def signup():
if not current_user.is_anonymous():
Expand All @@ -174,15 +176,18 @@ def signup():

return render_template('signup.html', form=signup_form)


@app.route('/password-recovery/')
@login_required
def password_recovery():
return render_template('password_recovery.html')


@app.route('/signup/done/')
def signup_done():
return render_template('signup_done.html')


@app.route('/profile/', methods=['GET', 'POST'])
@login_required
def profile():
Expand All @@ -203,6 +208,7 @@ def profile():

return render_template('profile.html', form=profile_form)


@app.route('/profile/confirm/', methods=['POST'])
@login_required
def profile_confirmation():
Expand Down
3 changes: 2 additions & 1 deletion blatt/www/auth.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from flask.ext.login import LoginManager
from sqlalchemy.orm.exc import NoResultFound

from blatt.persistence import User, session

Expand All @@ -16,5 +17,5 @@ def register_login_manager(app):
def load_user(user_id):
try:
return session.query(User).get(user_id)
except:
except NoResultFound:
return None

0 comments on commit 49d5dff

Please sign in to comment.