Ticket #6907: template_error_silencing_configuration.patch
File template_error_silencing_configuration.patch, 1.7 KB (added by , 16 years ago) |
---|
-
django/template/__init__.py
697 697 # raised in the function itself. 698 698 current = settings.TEMPLATE_STRING_IF_INVALID # invalid method call 699 699 except Exception, e: 700 if getattr( e, 'silent_variable_failure', False):701 current = settings.TEMPLATE_STRING_IF_INVALID700 if getattr(settings, "SHOW_TEMPLATE_ERRORS", False): 701 raise e 702 702 else: 703 raise 703 if getattr(e, 'silent_variable_failure', False): 704 current = settings.TEMPLATE_STRING_IF_INVALID 705 else: 706 raise 704 707 except (TypeError, AttributeError): 705 708 try: # list-index lookup 706 709 current = current[int(bit)] -
docs/settings.txt
958 958 959 959 .. _site framework docs: ../sites/ 960 960 961 SHOW_TEMPLATE_ERRORS 962 ------- 963 964 Default: ``False`` 965 966 This setting is a flag which tells the django template to don't silence errors. 967 It is useful when developing form widgets, avoiding debug issues, like 968 ``SyntaxError``, for example. 969 961 970 TEMPLATE_CONTEXT_PROCESSORS 962 971 --------------------------- 963 972