Reputation: 25
I have a flask application, with so far only one html page, with a layout.html page as a template. Here is the syntax:
{%extends "layout.html"}
{% block content %}
<main class="hero-section">
<div class="container">
<div class="section-content">
<h2> Discover places near you. </h2>
<a href="#" class="btn-primary">Sign up</a>
<a href="#" class="btn-secondary">Learn more</a>
</div>
<div class="section-device">
<img src="statkc/img/device.png">
</div>
<div class="clearfix"></div>
</div>
</main>
{% endblock %}
here is my template.html
<!DOCTYPE html>
<html>
<head>
<link href'http://fonts.googleapis.com /css?family=Open+Sans:300,400,600' rel='stylesheet'>
<link rel="stylesheet" type="text/css" href="static/css/main.css">
</head>
<body>
<header>
<div class="container">
<h1 class="title"> Learning Flask </h1>
</div>
</header>
{% block content %}
{% endblock %}
it returns an error templatesyntaxerror unexpected '}' I can't see where it should be, that is giving an error
Upvotes: 0
Views: 77
Reputation: 599470
Tags need to end with %}
, not just }
.
{% extends "layout.html" %}
(Note, the full error message would have told you exactly where the error is.)
Upvotes: 3