Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- following = [<User: testaccount1>, <User: testaccount2>]
- all_users_list = <QuerySet [{'id': 1, 'username': ‘testaccount1’},{‘id': 2, 'username': ‘testaccount2’},{‘id': 3, 'username': ‘testaccount2’}]
- {% for follow_user in all_users_list %}
- {% if follow_user.username in following %}
- FOLLOWING
- {% else %}
- Not Following
- {% endfor %}
Add Comment
Please, Sign In to add comment