Fred

TemplateSyntaxError: Invalid block tag on line 17: 'end', expected 'elif', 'else' or 'endif'. Did you forget to register or load this tag?

django Icon

TemplateSyntaxError

Invalid block tag on line 17: 'end', expected 'elif', 'else' or 'endif'. Did you forget to register or load this tag?

An unhandled exception occurred on line 17
14
          <p>
15
          {% if recipe_object.carb %}
16
            <strong>Carb Meal for training day</strong>
17
          {% end if %}
18

19
          {% if recipe_object.salad %}

Solution

Wrote {% end if %} instead of {% endif %}            
Apr 22, 2021 Anyone

0 replies


Install the browser extension

Found this solution helpful? Try our extension for quick solutions to your Django errors.

Chrome logo Add to Chrome - It's free