Permalink
Browse files

added redirect back to cover page if you're not logged in from home

  • Loading branch information...
1 parent e0412cf commit d6964770b4c49df794b201543b4b5e266e2b288e @tinabeans committed Apr 7, 2012
Showing with 5 additions and 1 deletion.
  1. +4 −0 index.py
  2. +1 −1 templates/base/common.html
View
@@ -114,6 +114,10 @@ def index():
@app.route('/home')
def home():
+
+ if 'userId' not in flask.session:
+ return flask.redirect(flask.url_for('index'));
+
newMeal = db.meals.find_one({'slug' : 'LemonGarlicKalePasta'})
# grab both the sent and received invitations that have been accepted
@@ -80,7 +80,7 @@ <h1 id="logo">
</nav><!-- #secondaryUserNav -->
</div><!-- userInfoContainer -->
- <a href="/invite/LemonGarlicKalePasta" id="bigInviteButton">
+ <a href="/invite" id="bigInviteButton">
<span class="big">Invite</span>
<span class="small"><em>a</em> Friend <em>to</em></span>
<span class="big">Cook!</span>

0 comments on commit d696477

Please sign in to comment.