Issue
Hello my block content does not work. My directory looks like this:
/first_page
/templates
/first_page
/landingPage.html
/base.html
This is my base.html file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
Text
{% block content %}
{% endblock %}
</body>
</html>
this is my landingPage.html file
{% extends "base.html" %}
{% block content %}
Hello StackOverflow!
{% endblock %}
Did I forget to include something? Do I have to change something in the settings? I will just "text" but not "Hello StackOverflow!"
Solution
Finally, I found the mistake:
I refered in my view to the "parent" file (base.html) instead of the "child" file (landingPage.html).
Answered By - GCMeccariello
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.