Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

230
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda