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 - Django Tutorial
From the course: Introduction to Django
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
-
-
-
-
-
-
(Locked)
Django architecture10m 45s
-
(Locked)
Django project structures6m 55s
-
(Locked)
Example project overview7m 53s
-
(Locked)
Deployment settings16m 17s
-
(Locked)
Django ORM: Models10m 10s
-
(Locked)
Django ORM: Queries15m 39s
-
(Locked)
Django ORM: Migrations5m 19s
-
(Locked)
The user model7m 37s
-
(Locked)
URLs8m 50s
-
(Locked)
Views11m 20s
-
(Locked)
Class-based views3m 38s
-
(Locked)
Admin8m 19s
-
(Locked)
Front end5m 14s
-
(Locked)
Templates8m 7s
-
(Locked)
Forms8m 17s
-
(Locked)
-