From the course: Introduction to Django

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Templates

Templates

- Hey, so now let's talk about the Django Template Language, which is the default template language that, you know, Django will use unless you configure it to use something else. So templates are just HTML files with a special syntax that the Django Template Language uses to replace with more dynamic content. So for example, if you wanted to show the value of a variable in your HTML page, you would include this variable tag in the template. And filters would be like you have a variable and then you want to do some sort of function or method applied to it. And then tags, you know, the variables and filters are things that you want to actually see in the final HTML, whereas a tag is more just for logic and you don't, it's not going to produce something that shows up on the page. And then here's the syntax for comments. So here's an example template that you could use, and this is using a lot of different features and I'll kind of cover what those are. So variables are some data that you…

Contents