[Fixed]-Why do balanced Django templating {% if %} and {% endif %} get Invalid block tag on line 50: 'endif', expected 'empty' or 'endfor'

1👍

Yes, Django template tags must be on a single line

See for example ticket #8652 (closed as wontfix), or this discussion on the django-developers mailing list.

You need to change tags like

{% if pet.shelter.name or 
    pet.shelter.website %}

to

{% if pet.shelter.name or pet.shelter.website %}

Leave a comment