Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixes #2384,#2566 -- Clarify the role that TEMPLATE_STRING_IF_INVALID…

… plays in the template system, and the problems that can occur if it is used on a production site.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 73a6eb8ed08da2342baa7f4b4ed9b6743b5fb241 1 parent f83e439
Russell Keith-Magee authored

Showing 1 changed file with 15 additions and 0 deletions. Show diff stats Hide diff stats

  1. 15  docs/templates_python.txt
15  docs/templates_python.txt
@@ -212,6 +212,21 @@ template tags. If an invalid variable is provided to one of these template
212 212
 tags, the variable will be interpreted as ``None``. Filters are always
213 213
 applied to invalid variables within these template tags.
214 214
 
  215
+.. admonition:: For debug purposes only!
  216
+
  217
+    While ``TEMPLATE_STRING_IF_INVALID`` can be a useful debugging tool, 
  218
+    it is a bad idea to turn it on as a 'development default'. 
  219
+    
  220
+    Many templates, including those in the Admin site, rely upon the 
  221
+    silence of the template system when a non-existent variable is 
  222
+    encountered. If you assign a value other than ``''`` to
  223
+    ``TEMPLATE_STRING_IF_INVALID``, you will experience rendering 
  224
+    problems with these templates and sites.
  225
+    
  226
+    Generally, ``TEMPLATE_STRING_IF_INVALID`` should only be enabled 
  227
+    in order to debug a specific template problem, then cleared 
  228
+    once debugging is complete.
  229
+        
215 230
 Playing with Context objects
216 231
 ----------------------------
217 232
 

0 notes on commit 73a6eb8

Please sign in to comment.
Something went wrong with that request. Please try again.