chrisvans / onbaristawebapp

Web App for Baristas to check in when they are on bar
0 stars 1 forks source link

Make sure that a logged out user gets redirected to the proper place, no errors are thrown. #23

Closed chrisvans closed 11 years ago

AJLeonardi commented 11 years ago

there's a decorator for this just like flask.

chrisvans commented 11 years ago

I just ended up making a login_handler in views that returns True if there is no 'user' key in the session dictionary. Then put an if statement for each relevant view which renders the login_view if login_handler returns False. This took about the same effort as a decorator would. I'm going to check and see if this could cause any issues, but it works fine right now.