ach-relation>
>> :
>>
>> @classmethod
>> def get_latest_by_activity_ids(cls, activity_id):
>> found = []
>> for aid in Activity.objects.all():
>>
>> found.append(cls.objects.filter(activity_id=aid).lates
on>
>>> :
>>>
>>> @classmethod
>>> def get_latest_by_activity_ids(cls, activity_id):
>>> found = []
>>> for aid in Activity.objects.all():
>>>
>>> found.append(cls.objects.filter(activity_id=aid).lat
t; :
>>
>> @classmethod
>> def get_latest_by_activity_ids(cls, activity_id):
>> found = []
>> for aid in Activity.objects.all():
>>
>> found.append(cls.objects.filter(activity_id=aid).latest("status_date"))
>>
return found
>
> This gave me a list of dates. Now I'm blocked to sum them up per month.
>
>
>
> https://stackoverflow.com/questions/60366457/get-last-instance-object-per-each-month-and-sum-per-month-in-django
>
>
> --
> You received this message because
.objects.filter(activity_id=aid).latest("status_date"))
return found
This gave me a list of dates. Now I'm blocked to sum them up per month.
https://stackoverflow.com/questions/60366457/get-last-instance-object-per-each-month-and-sum-per-month-in-django
--
You received
5 matches
Mail list logo