Skip to content

Commit

Permalink
added redirect back to cover page if you're not logged in from home
Browse files Browse the repository at this point in the history
  • Loading branch information
tinabeans committed Apr 7, 2012
1 parent e0412cf commit d696477
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions index.py
Expand Up @@ -114,6 +114,10 @@ def index():


@app.route('/home') @app.route('/home')
def home(): def home():

if 'userId' not in flask.session:
return flask.redirect(flask.url_for('index'));

newMeal = db.meals.find_one({'slug' : 'LemonGarlicKalePasta'}) newMeal = db.meals.find_one({'slug' : 'LemonGarlicKalePasta'})


# grab both the sent and received invitations that have been accepted # grab both the sent and received invitations that have been accepted
Expand Down
2 changes: 1 addition & 1 deletion templates/base/common.html
Expand Up @@ -80,7 +80,7 @@ <h2>
</nav><!-- #secondaryUserNav --> </nav><!-- #secondaryUserNav -->
</div><!-- userInfoContainer --> </div><!-- userInfoContainer -->


<a href="/invite/LemonGarlicKalePasta" id="bigInviteButton"> <a href="/invite" id="bigInviteButton">
<span class="big">Invite</span> <span class="big">Invite</span>
<span class="small"><em>a</em> Friend <em>to</em></span> <span class="small"><em>a</em> Friend <em>to</em></span>
<span class="big">Cook!</span> <span class="big">Cook!</span>
Expand Down

0 comments on commit d696477

Please sign in to comment.