-
Notifications
You must be signed in to change notification settings - Fork 0
Adding a base.html #3
Raul Torres edited this page Apr 21, 2020
·
1 revision
IMPORTANT NOTE Creating a file base.html will allow code to cleaner. By making this, any changing or adding snippets to the code, will be done in this file without affecting other files.
First, create a file 'base.html'. Type the boiler plate HTML tags. In order to render the contents, you'll have to use this syntax:
Within body tags. {% block content %} {% endblock %} For every page (file.html) -Use this syntax -at the begining => {% extends "blog/base.html" %}
Then => {% block content %} all html content {% endblock content%} i.e. => in about.html {% block content %} About Page {% endblock content%}