Skip to content

Commit

Permalink
Added the user object to the index view's context
Browse files Browse the repository at this point in the history
  • Loading branch information
croach committed Dec 16, 2012
1 parent 1dc3671 commit a93ed2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion stories/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ def top_stories(top=180, consider=1000):

def index(request):
stories = top_stories(top=30)
return render(request, 'stories/index.html', {'stories': stories})
return render(request, 'stories/index.html', {
'stories': stories,
'user': request.user
})

@login_required
def story(request):
Expand Down

0 comments on commit a93ed2c

Please sign in to comment.