Reputation: 9
I am doing a basic flask html extension and I have no idea why it is throwing an error. Here is my code:
What syntax error am I missing?
Upvotes: 0
Views: 1376
Reputation: 6071
In your base.html
, it should be {% extends "base.html" %}
, not {% {% extends base.html %} %}
.
Remove that and you are good to go.
EDIT:
Also, to keep content from base.html
, use {{ super() }}
as a first line in blocks
.
For example:
{% extends "base.html" %}
{% block content %}
{{ super() }} {# to keep yours h1 tag #}
...Additional content to add
{% endblock %}
Upvotes: 1
Reputation: 11
Dinko is correct. Next time, try use Debug=True and post the output here. It's help to find a error.
See http://flask.pocoo.org/docs/1.0/patterns/templateinheritance/ to more information about Templates.
Upvotes: 1