J. Smith
J. Smith

Reputation: 53

Django TemplateSyntaxError

Currently working through an online tutorial and running into a TemplateSyntaxError:

Could not parse the remainder: '“personal/header.html”' from '“personal/header.html”'

My files can be found below. This is my first post to StackOverflow so please let me know if there's additional information I should include to make things more clear in the future.

header.html file

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Jamie Smith</title>
    <meta charset="utf-8" />
</head>
<body class="body" style="background-color:#f6f6f6">
    <div>
      {% block content %}
      {% endblock %}    
    </div>
</body>
</html>

home.html file

{% extends “personal/header.html” %}
{% block content %}
<p>Hey, welcome to my website! I am a wannabe programmer!</p>
{% endblock %}

Template Error

Template error:

In template /Users/jamie/Desktop/Django Tutorials/mysite/personal/templates/personal/home.html, error at line 16
   Could not parse the remainder: '“personal/header.html”' from '“personal/header.html”'   6 :   <title></title>
   7 :   <meta name="Generator" content="Cocoa HTML Writer">
   8 :   <meta name="CocoaVersion" content="1504.81">
   9 :   <style type="text/css">
   10 :     p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 17.0px; font: 15.0px Courier; color: #660066; -webkit-text-stroke: #660066}
   11 :     p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 17.0px; font: 15.0px Courier; color: #000000; -webkit-text-stroke: #000000}
   12 :     span.s1 {font-kerning: none}
   13 :   </style>
   14 : </head>
   15 : <body>
   *16 : <p class="p1"><span class="s1"> {% extends “personal/header.html” %} </span></p>*
   17 : <p class="p2"><span class="s1">{% block content %}</span></p>
   18 : <p class="p2"><span class="s1">&lt;p&gt;Hey, welcome to my website! I am a wannabe programmer!&lt;/p&gt;</span></p>
   19 : <p class="p2"><span class="s1">{% endblock %}</span></p>
   20 : </body>
   21 : </html>

Any guidance would be great! Thanks!

Upvotes: 0

Views: 923

Answers (1)

nik_m
nik_m

Reputation: 12096

Better change to single or double quotes:

{% extends 'personal/header.html' %}

or this:

{% extends "personal/header.html" %}

Upvotes: 1

Related Questions