I am using Google App engine, in the html file I want to show different screens to different users, ie,
- they are not logged in the show them a log in screen
- They are logged in and this is there first time to use the system
- They are a returning user
So far the loops in my code is as follows
{% ifequal access_token None %}
<!-- Log in user-->
{% else %}
{% ifequal user_set None %}
<!-- First ever user in DB -->
{% else%}
{% for user in user_set %}
{% ifequal user.session_ID access_token %}
<a href="/logout">Logout {{user.user_name}}</a>
{% else %}
<!-- add in counter? -->
{%endifequal%}
{% endfor %}
{% endifequal%}
{% endifequal %}
Is there anyway to increment a counter in the for loop as shown in the comments which could then be checked and if 0 then the user is not in the db already?