These are chat archives for django/django

Jun 2015
Craig Labenz
Jun 08 2015 14:22
This code can help you dynamically grab all records with any amount of matches:
After that, you will likely have to do the sorting manually in pure python
@ramaseshan Thoughts to your question above.
That code is a bit outdated now, too. The idea is still solid, but I would put the logic directly on your queryset by using Django 1.7's objects = MyQuerySet.as_manager(), as per these docs