[Answer]-Access attributes from retrieved model object in django

1👍

Event.objects.order_by('start').filter(start__year=year, start__month=month)

Returns a list of matching Event objects. You then pass this QuerySet list to:

group_by_day(self, event)

Which from your parameter names suggests you think you are passing a single event. So it doesn’t work.

👤jvc26

Leave a comment