I want to exclude non-active users from my project.
example 1:
url:users/1/friends/ will show all friends of that user.
I want to show only active users in friend list.
example 2:
url:users/1/friends/ will show all friends of that user.
if user with id 1 is not active i don't want to show any activity of him..like his friends..his profile...etc
example 3:
url:users/1/challenge/ will show all friends of that user in post form.
i don't want to show non-active users in form.
is there any generic way to perform this. Because its a big project and I can't make filter everywhere.
Tables are like:
class User(models.Model):
......
......
friends = models.ForeignKey(User)