Guest User

Untitled

a guest
Dec 16th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. following = [<User: testaccount1>, <User: testaccount2>]
  2.  
  3. all_users_list = <QuerySet [{'id': 1, 'username': ‘testaccount1’},{‘id': 2, 'username': ‘testaccount2’},{‘id': 3, 'username': ‘testaccount2’}]
  4.  
  5. {% for follow_user in all_users_list %}
  6. {% if follow_user.username in following %}
  7. FOLLOWING
  8. {% else %}
  9. Not Following
  10. {% endfor %}
Add Comment
Please, Sign In to add comment