Django Template. A template is rendered with a context. This tag can be used in two ways: % extends "base.html" % (with quotes) uses the literal value "base.html" as the name of the parent template to extend. % extends variable % uses the value of variable.
Signals that this template extends a parent template.
We need to be able to point Django at the right one, and the best way to ensure this is by namespacing them. django.template.
Some constructs are recognized and interpreted by the template engine. Templates¶ Django's template engine provides a powerful mini-language for defining the user-facing layer of your application, encouraging a clean separation of application and presentation logic. The if tag can be associated with an optional else tag, where the if tag corresponds to the if conditional statement which is used when we want to test a condition for a boolean value - true or false and the else tag corresponds to the else in the if-else conditional statement.