Django Tutorial for Beginners - 14 - Templates

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

zero dislike as of 2017, what a legendary teacher this NB is !

JonesDTaylor
Автор

I'm only 11, but someday I want to work for google as a programmer. I'm just starting to learn server-side programming, but you really help me learn as much as I can. Thanks!

elijahbentley
Автор

Thanks guys for watching, I will smell you the next time!

wetpenguin
Автор

This is by far the simplest and best explanation of Django templates that I've come across. All the others I've seen were needlessly convoluted.

saviofernandes
Автор

"Yada yada, tomato tomoto" - Bucky Roberts, 2016

RashoodGFX
Автор

In case you are getting any errors related to templates, replace TEMPLATES portion in settings.py by this code -
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

ManishKumar-mnyz
Автор

Hey man, these tutorials are AWESOME! You really make me understand the logic behind all, which I believe is the most important thing to really learn it and use it later on my own. I watched like 3 tutorials already, but yours are the best of the best. Huge thanks!
BTW I also have a question. WHY do we need dictionaries to pass a variable to the templates?

LSZLO
Автор

TemplateDoesNotExist at /music/
How to set path for the template?

surajmishra
Автор

for those whose template is not working change the .html file to a .txt and it'll work. Dont forget to add <html> tag

rifatmasud
Автор

Hey Bucky, you look like an actor and pro lecturer. its really hard to be able to joke without looking wiered, keep motivating and explaining these not easy things. thanx

GiorgiGvimradze
Автор

if you are getting Template doesn't exist
make sure that in setting.py file
'DIRS': ['/music/'], #and in the views.py file
template =

deepankarprabhakar
Автор

Hello, I have copied this exactly, however when I type: template = I get a yellow highlight over the file path saying "Template "music/index.html" is not found". Any help would be greatly appreciated!

Speedboycentral
Автор

who the hell would give you thumb down!! man you re awesome thank you very much I cant believe
I'm beginning to understand Django very well because of your tutorials!
Thank you again!

nuhaaziz
Автор

I don't understand render function or why we use dictionary called "context"?

qnsgzmm
Автор

I love Bucky.. I can't get through his videos without laughing my ass off. Thanks man. You make learning painless

OlumideOni
Автор

* phone rings *
Bucky: - "Who is texting me?"

SomebodyOutThre
Автор

can anyone explain me why do we have to make the context dictionary? I really don't get...

leventerencsik
Автор

If you see BLANK SCREEN... Make sure to type all variable names correctly in HTML file :)

TheAJMarketing
Автор

Hey guys I need help with something. Actually I am working on an existing java website now I need to do some prediction using py code and was hoping that I can use ajax and Django for this has handler but I am not able to do this. Can anyone suggest me something please really need help

vishalsingh-thnj
Автор

so what exactly is the bit {% for album in all_albums %} with the {% endfor %} is that just how python code is integrated into an HTML file?

Darthdeedee