Display books timeline
This commit is contained in:
parent
5a9dbc50da
commit
9d75bc3982
5 changed files with 22 additions and 27 deletions
|
@ -23,10 +23,10 @@ class Feed(View):
|
|||
|
||||
def get(self, request, tab):
|
||||
"""user's homepage with activity feed"""
|
||||
if not tab in STREAMS:
|
||||
tab = "home"
|
||||
tab = [s for s in STREAMS if s["key"] == tab]
|
||||
tab = tab[0] or STREAMS[0]
|
||||
|
||||
activities = activitystreams.streams[tab].get_activity_stream(request.user)
|
||||
activities = activitystreams.streams[tab["key"]].get_activity_stream(request.user)
|
||||
paginated = Paginator(activities, PAGE_LENGTH)
|
||||
|
||||
suggestions = suggested_users.get_suggestions(request.user)
|
||||
|
@ -38,8 +38,9 @@ class Feed(View):
|
|||
"activities": paginated.get_page(request.GET.get("page")),
|
||||
"suggested_users": suggestions,
|
||||
"tab": tab,
|
||||
"streams": STREAMS,
|
||||
"goal_form": forms.GoalForm(),
|
||||
"path": "/%s" % tab,
|
||||
"path": "/%s" % tab["key"],
|
||||
},
|
||||
}
|
||||
return TemplateResponse(request, "feed/feed.html", data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue