Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Element(models.Model):
- Source1 = models.ManyToManyField(Source1)
- Source2 = models.ManyToManyField(Source2)
- Source3 = models.ManyToManyField(Source3)
- Ranked = (Link.objects.all().aggregate(
- Ranked=Sum(F('Source1') + F('Source2') + F('Source3'), output_field=IntegerField)['Ranked']
- ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement