6๐
โ
Okay โฆ so I figured out my mistake. I was operating under the assumption all along that the notification_feed
was a flat feed. Whoops, by bad. It is actually aggregated. Therefore, I was able to make fixes as follows:
Instead of:
activities = enricher.enrich_activities(activities)
I used:
enriched_activities = enricher.enrich_aggregated_activities(activities)
Then, in my base template:
{% for enriched_activity in enriched_activities %}
{% render_activity enriched_activity %}
{% endfor %}
Which looks in /activity/aggregated/task.html
{% for activity in enriched_activity.activities %}
{% render_activity activity %}
{% endfor %}
And finally inside /activity/task.html I see the output as expected from these items.
Actor: {{ activity.actor.first_name }}<br>
Title: {{ activity.object.title }}<br>
Time: {{ activity.time|timesince }}<br>
๐คAdam Hopkins
Source:stackexchange.com