Django Tutorial #13 - Extending Templates

preview_player
Показать описание
Hey gang, in this django tutorial we'll take a look at ow we can create a base template layout, and then extend that layout from other page-specific templates. This means we don't have to keep on re-writing common parts of our HTMl template over and over.

----- COURSE LINKS:

======== Other Tutorials =========

----- NODE.JS TUTORIALS

----- MONGODB TUTORIALS

======== Social Links ==========

Рекомендации по теме
Комментарии
Автор

Guys, be careful, in Python3 is a little different.
for example: {% load static from staticfiles%} becomes {% load static%}

Small differences that can drive you crazy.

However fantastic tutorial

popdaniele
Автор

Omw!! Literally, thank God for you!! I was ready to cry before I stumbled on your page! I felt so dumb before! Maybe other people were just giving dumb explanations, cause everything seems so much easier now!

fireberrywocky
Автор

THANK YOU! I have been confused about this topic all day trying to find videos explaining it but your video cleared it all up for me thanks!

-rln
Автор

It is criminal this only has 37k views. Idk how u could have made this any easier to understand

JollyBeJolly
Автор

As always, short, precise and well explained !

aakashjha
Автор

Thanks. I decide to work on my personal project with Django, after I watch your tutorials. Keep up the good work :)

setkyarwalar
Автор

thank you sir, i read the docs but i cant understand until watch your video

C-RickSanchez
Автор

Thanks man, you saved me, keep up the good job.

funwithpython
Автор

This was exactly what I was looking for!
Thank you for saving my time, next time I subscribe.<3

linkymcfinkelstein
Автор

Hi, nice video! I was wondering how could you perform 'template extends' in two steps? extend template 1 into template 2, followed by extend template 2 into template 3??

tz
Автор

Thank you, It was a much required concept

algoholic
Автор

You're an awesome teacher bro : )

hamamathivha
Автор

The stof hahaha, love that british accent

TKDVL
Автор

Question, how would you add tags to the head from the template because I tried and like my base description keeps over riding my template tags or it keeps taking the image on my nav and ignoring what I set as the image

mrvanhoyte
Автор

Extend the template but render the new template. Anybody following step by step : do remember to render the new template not the base template.

codejns
Автор

thank you so much and very help full to me

viswanadhgounipalli
Автор

thx
I hope, someday I will watch playlist for Django in production :-)

Lbmaniak
Автор

Hey I have a question. How do I do partial template inheritance?
My problem is I have a base template that many of my templates inherit from and it has a container with 2 columns, col-md-8 and col-md-4.
On the col-md-8 column part of the container is where the {% block content %} lives and on the other one the col-md-4 is my sidebar.
Now when I use my registration form since it inherits from base template I have a col-md-8 form but I don't want to see sidebar when I register...
Anyone any ideas?

panagiotisgoulas
Автор

Hello Ninja, will you show us how to deploy the website using mod-wsgi? Really looking forward, thanks.

kouyajia
Автор

Reason Unknown to me: If your block contents ain't working
Try renaming the base_layout.html to base.html
This worked for me. Would be thankful if anyone explains me the reason

sabyasachisamantaray