Skip to content

Commit

Permalink
Cleaned up app.py file
Browse files Browse the repository at this point in the history
  • Loading branch information
zacbennett committed Oct 16, 2018
1 parent 1b0c815 commit c2fb7b8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
Binary file modified __pycache__/app.cpython-37.pyc
Binary file not shown.
12 changes: 1 addition & 11 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ def do_login(user):

def do_logout():
"""Logout user."""
print('\n\n\n\n', 'boop')

print('\n\n\n\n', session)

# import pdb; pdb.set_trace()


if CURR_USER_KEY in session:
del session[CURR_USER_KEY]

Expand Down Expand Up @@ -120,8 +115,6 @@ def logout():

do_logout()

# No flash message

return redirect("/login")

##############################################################################
Expand Down Expand Up @@ -177,7 +170,6 @@ def show_following(user_id):
return redirect("/")

user = User.query.get_or_404(user_id)
import pdb; pdb.set_trace()
return render_template('users/following.html', user=user)


Expand Down Expand Up @@ -233,7 +225,6 @@ def profile():

if form.validate_on_submit():

# FIX THIS!
user_auth = User.authenticate(username=g.user.username, password=form.data['password'])

if user_auth:
Expand Down Expand Up @@ -341,7 +332,6 @@ def remove_favorite_message(message_id):

user_id = g.user.id
unfavorite = Favorite.query.filter(Favorite.msg_id==message_id).first()
# import pdb; pdb.set_trace()
db.session.delete(unfavorite)
db.session.commit()

Expand Down

0 comments on commit c2fb7b8

Please sign in to comment.