Commit 74365585 authored by Neal Todd's avatar Neal Todd Committed by Tim Graham
Browse files

Fixed #25732 -- Updated template system design philosophy.

Removed the bit about not allowing assignment to variables
because simple_tag now allows this.
parent cb322921
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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