Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

219
Views
Could not parse the remainder: '=='Sophia'' from 'abc.first_name=='Sophia'' Python/Django

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.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

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' %}
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!