Django

Code

Changeset 1218

Show
Ignore:
Timestamp:
11/13/05 16:59:51 (3 years ago)
Author:
adrian
Message:

Added 'Safety and security' section to docs/design_philosophies.txt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/design_philosophies.txt

    r891 r1218  
    176176code. 
    177177 
    178 This is the philosophy behind template inheritance. 
     178This is the philosophy behind `template inheritance`_. 
     179 
     180.. _template inheritance: http://www.djangoproject.com/documentation/templates/#template-inheritance 
    179181 
    180182Be decoupled from HTML 
     
    198200The template system shouldn't do magic things with whitespace. If a template 
    199201includes whitespace, the system should treat the whitespace as it treats text 
    200 -- just display it. 
     202-- just display it. Any whitespace that's not in a template tag should be 
     203displayed. 
    201204 
    202205Don't invent a programming language 
     
    211214enough programming-esque functionality, such as branching and looping, that is 
    212215essential for making presentation-related decisions. 
     216 
     217The Django template system recognizes that templates are most often written by 
     218*designers*, not *programmers*, and therefore should not assume Python 
     219knowledge. 
     220 
     221Safety and security 
     222------------------- 
     223 
     224The template system, out of the box, should forbid the inclusion of malicious 
     225code -- such as commands that delete database records. 
     226 
     227This is another reason the template system doesn't allow arbitrary Python code. 
    213228 
    214229Extensibility