ömer sarı ömer sarı - 6 months ago 50
HTML Question

Invalid block tag : 'endblock'. Did you forget to register or load this tag?

l get stuck in this error. l'm fresh user of

and l m learning it by following steps on Youtube channel. l did everything same but l got this block tag error.
here is layout1 html content:

<!DOCTYPE html>
<html lang="en">

<meta charset="UTF-8">
<title>{ % block title %}{% endblock %}</title>
{ % block content %} {% endblock %}

index html content:

{% extends "layout/layout1.html"%}

{% block title %}The Video page{% endblock %}

{ % block content %}

<h1>This is a html</h1>

<p>This is a p tag</p>

<a href="http://www.noobmovies.com">Click me!</a>
<img src="https://upload.wikimedia.org/wikipedia/en/7/72/Anthony_Raneri.jpg"/>

{% endblock % }

views.py content:

from django.template.response import TemplateResponse

# Create your views here.
def video(request):

return TemplateResponse (request,"video/index.html",{})

how can l handle this problem? as l did double-check to make sure everything is typed same like Youtube channel and normally ,l did not get where l did a mistake.


Django didn't recognise your starting block tag, because you have a space between the { and the %.

You also have the same error in both start and end tags in the other template file.