I\'ve got a ManyToManyField in a user object and it\'s used to map the users that user is following. I\'m trying to show a subset list of who they have most recently followe
Tested with Django 1.11.10
.
You don't have to hardcode the relationship table name (How to read the database table name of a Model instance?).
So an update on @Ry4an Brase's answer can look like
recently_followed = '-{}.id'.format(theuser.following.through._meta.db_table)
theuser.following.filter(user__is_active=True).order_by(recently_followed)