Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.6.x] Fixed #20962 -- Documented that template tag render() may rai…

…se exceptions.

Thanks Keryn Knight for the report.

Backport of e077224 from master
  • Loading branch information...
commit 7f566fdb4c8453c8fa4b44d0fe5cc28472acc2ff 1 parent 8222a48
Bouke Haarsma authored timgraham committed
1  AUTHORS
@@ -268,6 +268,7 @@ answer newbie questions, and generally made Django that much better:
268 268
     Janos Guljas
269 269
     Thomas Güttler <hv@tbz-pariv.de>
270 270
     Horst Gutmann <zerok@zerokspot.com>
  271
+    Bouke Haarsma <bouke@haarsma.eu>
271 272
     Antti Haapala <antti@industrialwebandmagic.com>
272 273
     Scot Hacker <shacker@birdhouse.org>
273 274
     dAniel hAhler
8  docs/howto/custom-template-tags.txt
@@ -477,8 +477,12 @@ Notes:
477 477
 
478 478
 * The ``render()`` method is where the work actually happens.
479 479
 
480  
-* ``render()`` should never raise ``TemplateSyntaxError`` or any other
481  
-  exception. It should fail silently, just as template filters should.
  480
+* ``render()`` should generally fail silently, particularly in a production
  481
+  environment where :setting:`DEBUG` and :setting:`TEMPLATE_DEBUG` are
  482
+  ``False``. In some cases however, particularly if :setting:`TEMPLATE_DEBUG` is
  483
+  ``True``, this method may raise an exception to make debugging easier. For
  484
+  example, several core tags raise ``django.template.TemplateSyntaxError``
  485
+  if they receive the wrong number or type of arguments.
482 486
 
483 487
 Ultimately, this decoupling of compilation and rendering results in an
484 488
 efficient template system, because a template can render multiple contexts

0 notes on commit 7f566fd

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