Fixed #25732 -- Updated template system design philosophy.

Removed the bit about not allowing assignment to variables
because simple_tag now allows this.
This commit is contained in:
Neal Todd 2015-11-11 15:21:43 +00:00 committed by Tim Graham
parent cb32292176
commit 74365585e2
1 changed files with 2 additions and 6 deletions

View File

@ -249,14 +249,10 @@ displayed.
Don't invent a programming language
-----------------------------------
The template system intentionally doesn't allow the following:
* Assignment to variables
* Advanced logic
The goal is not to invent a programming language. The goal is to offer just
enough programming-esque functionality, such as branching and looping, that is
essential for making presentation-related decisions.
essential for making presentation-related decisions. The :ref:`Django Template
Language (DTL) <template-language-intro>` aims to avoid advanced logic.
The Django template system recognizes that templates are most often written by
*designers*, not *programmers*, and therefore should not assume Python