Django: Getting Started Transcripts
Chapter: HTML Templates
Lecture: Creating the About page
Login or
purchase this course
to watch this video and the rest of the course contents.
0:07
to inherit from bates dot HTML. You use the extends tag. This is like a class declaration with an inheritance marker
0:16
inside of Python. You'll recall that. I put a block in the title tag. I've overridden that here. Now when this page gets rendered,
0:28
the title tag will say what's in this block rather than the default in the parent
0:32
And here I've replaced the empty content block in the parent with some actual content
0:49
and the about page is done. The pain of base dot HTML becomes the pleasure of about dot HTML.
0:56
All the pages moving forward can use this inheritance to keep the content simple and only
1:01
including the stuff you're interested in when editing them furthermore, when it comes time to change the nav bar,
1:08
you edit based on HTML and the results will show up in all the rendered Children