def notification_feed(request): enricher = Enrich(request.user) context = {} feed = feed_manager.get_notification_feed(request.user.id) activities = feed.get(limit=25, mark_seen='all')['results'] context['activities'] = enricher.enrich_aggregated_activities(activities) response = render(request, 'core/notification_feed.html', context) return response
def notification_feed(request): enricher = Enrich(request.user) context = RequestContext(request) feed = feed_manager.get_notification_feed(request.user.id) activities = feed.get(limit=25, mark_seen='all')['results'] context['activities'] = enricher.enrich_aggregated_activities(activities) response = render_to_response('core/notification_feed.html', context) return response
def notification_feed(request): enricher = Enrich(request.user) context = RequestContext(request) feed = feed_manager.get_notification_feed(request.user.id) activities = feed.get(limit=25, mark_seen="all")["results"] context["activities"] = enricher.enrich_aggregated_activities(activities) response = render_to_response("core/notification_feed.html", context) return response
def aggregated_feed(request): ''' Items pinned by the people you follow ''' enricher = Enrich(request.user) context = RequestContext(request) feed = feed_manager.get_news_feeds(request.user.id)['aggregated'] activities = feed.get(limit=25)['results'] context['activities'] = enricher.enrich_aggregated_activities(activities) response = render_to_response('core/aggregated_feed.html', context) return response
def feed(request): ''' Items pinned by the people you follow ''' enricher = Enrich(request.user) context = {} feed = feed_manager.get_news_feeds(request.user.id)['timeline'] activities = feed.get(limit=25)['results'] context['activities'] = enricher.enrich_activities(activities) response = render(request, 'core/feed.html', context) return response
def aggregated_feed(request): ''' Items pinned by the people you follow ''' enricher = Enrich(request.user) context = {} feed = feed_manager.get_news_feeds(request.user.id)['timeline_aggregated'] activities = feed.get(limit=25)['results'] context['activities'] = enricher.enrich_aggregated_activities(activities) response = render(request, 'core/aggregated_feed.html', context) return response
def aggregated_feed(request): """ Items pinned by the people you follow """ enricher = Enrich(request.user) context = RequestContext(request) feed = feed_manager.get_news_feeds(request.user.id)["aggregated"] activities = feed.get(limit=25)["results"] context["activities"] = enricher.enrich_aggregated_activities(activities) response = render_to_response("core/aggregated_feed.html", context) return response
def profile(request, username): ''' Shows the users profile ''' enricher = Enrich(request.user) profile_user = get_user_model().objects.get(username=username) feed = feed_manager.get_user_feed(profile_user.id) activities = feed.get(limit=25)['results'] context = RequestContext(request) do_i_follow_users(request.user, [profile_user]) context['profile_user'] = profile_user context['activities'] = enricher.enrich_activities(activities) response = render_to_response('core/profile.html', context) return response
def profile(request, username): ''' Shows the users profile ''' enricher = Enrich(request.user) profile_user = get_user_model().objects.get(username=username) feed = feed_manager.get_user_feed(profile_user.id) activities = feed.get(limit=25)['results'] context = {} do_i_follow_users(request.user, [profile_user]) context['profile_user'] = profile_user context['activities'] = enricher.enrich_activities(activities) response = render(request, 'core/profile.html', context) return response
def profile(request, username): """ Shows the users profile """ enricher = Enrich(request.user) profile_user = get_user_model().objects.get(username=username) feed = feed_manager.get_user_feed(profile_user.id) activities = feed.get(limit=25)["results"] context = RequestContext(request) do_i_follow_users(request.user, [profile_user]) context["profile_user"] = profile_user context["activities"] = enricher.enrich_activities(activities) response = render_to_response("core/profile.html", context) return response