1
0
mirror of https://github.com/django/django.git synced 2024-12-25 02:26:12 +00:00
Commit Graph

6 Commits

Author SHA1 Message Date
Preston Timmons
55f12f8709 Cleaned up the template debug implementation.
This patch does three major things:

* Merges the django.template.debug implementation into django.template.base.

* Simplifies the debug implementation.

  The old implementation copied debug information to every token and node.
  The django_template_source attribute was set in multiple places, some
  quite hacky, like django.template.defaulttags.ForNode.

  Debug information is now annotated in two high-level places:

  * Template.compile_nodelist for errors during parsing
  * Node.render_annotated for errors during rendering

  These were chosen because they have access to the template and context
  as well as to all exceptions that happen during either the parse or
  render phase.

* Moves the contextual line traceback information creation from
  django.views.debug into django.template.base.Template. The debug views now
  only deal with the presentation of the debug information.
2015-03-20 08:58:07 -04:00
Tim Graham
0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Aymeric Augustin
92a2d049a2 Isolated template tests from Django settings. 2014-12-28 16:23:01 +01:00
Preston Timmons
5c68870169 Fixed #23958 -- Rewrote filter tests as unit tests. 2014-12-06 10:57:46 -05:00
Ramiro Morales
16f26defa7 Converted recently refactored templates tests to SimpleTestCase.
These test methods don't need DB setup/teardown.

Refs #23768 and b872134b.
2014-12-03 18:56:46 -05:00
Preston Timmons
b872134bfc Fixed #23768 -- Rewrote template tests as unit tests. 2014-12-02 19:18:35 -05:00