November 2015
Beginner to intermediate
840 pages
26h 30m
English
Developers use templates to control the output of Django. Templates are the only non-Python part of Django. While browsers expect to receive HTML, the Django Template Language (DTL) is built in a language-agnostic manner, allowing developers to generate YAML, XML, JSON, or any other imaginable markup. Templates are rendered (generated) using a context (a dictionary with data).
The DTL is a domain-specific language with an interesting shortcoming. The language provides loops, conditions, and all the hallmarks of a real programming language, but it lacks the ability to set new long-term variables (I am discounting the creation of scoped variables thanks to loops and the with tag, which we have yet ...
Read now
Unlock full access