Now that you've gotten a feel for the Django Template Language(DTL), it is probably time to explain the basic design philosophy behind the DTL. First and foremost, the limitations to the DTL are intentional.
Django was developed in the high volume, ever-changing environment of an online newsroom. The original creators of Django had a very definite set of philosophies in creating the DTL.
These philosophies remain core to Django today. They are:
Separate logic from presentation
Discourage redundancy
Be decoupled from HTML
XML is bad
Assume designer competence
Treat whitespace obviously
Don't invent a programming language
Ensure safety and security
Extensible
Following is the explanation for this:
Separate logic from presentation
A template system is a tool that controls presentation and presentation-related logic-and that's it. The template system shouldn't support functionality that goes beyond this basic goal.
Discourage redundancy
The majority of dynamic websites use...