I'm trying to put an == sign inside an if statement in my html document (fourth line).
It looks like this:
<ol>
{% for league in teams %}
{% for abc in league.curr_players.all %}
{% if abc.first_name=='Sophia' %}
<li>{{league.location}} {{league.team_name}} </li>
{% endif %}
{% endfor %}
{% empty %}
<p>No leagues found. Try <code>python manage.py loaddata data.json</code>, or, if that doesn't work, going <a href="{% url 'make_data' %}">here</a> (but be prepared to wait).</p>
{% endfor %}
</ol>
Anyways, I keep getting this error saying it can't parse the argument at that certain point.
Django's template parser is pretty unsophisticated, unlike Python's. One consequence of this is that you need to use spaces around every operator.
{% if abc.first_name == 'Sophia' %}