| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
| |
DisallowedHost.
|
| |
|
|
|
|
|
|
|
| |
toggle.
The whitespace added in 1101467ce0756272a54f4c7bc65c4c335a94111b
broke the initial comparison.
|
|
|
|
| |
in error reporting.
|
|
|
|
|
| |
Removed extra blank lines in the template text debug template,
and prevented overindentation in the HTML debug template.
|
| |
|
|
|
|
| |
Thanks Tomáš Ehrlich for help with the patch.
|
|
|
|
| |
template backends.
|
|
|
|
|
|
|
|
|
| |
page.
This now works for multiple Django engines and recursive loaders.
Support for non-Django engines is still pending.
Refs #15053.
|
|
|
|
|
| |
There's absolutely no advantage [and a mild performance hit] to using six.iter*
in these cases.
|
|
|
|
| |
lines.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
view.
|
| |
|
|
|
|
| |
specific exceptions.
|
|
|
|
|
|
|
|
|
|
| |
During the autumn DST change, the template engine would fail to convert
the naive representation of now when USE_TZ = True. Passing now in UTC
eliminates the issue.
Thanks mbertheau and tricoder42.
Refs #23714.
|
| |
|
|
|
|
|
|
| |
In addition to ImproperlyConfigured, Engine.get_default() may also raise
ImportError or other exceptions. It's better to catch all exceptions in
places where the default engine isn't strictly required.
|
|
|
|
| |
template engine.
|
| |
|
|
|
|
| |
generators and dict comprehension
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Passed the engine instance to loaders. This is a prerequisite for
looking up configuration on the engine instance instead of global
settings.
This is backwards incompatible for custom template loaders that override
__init__. However the documentation doesn't talk about __init__ and the
way to pass arguments to custom template loaders isn't specified. I'm
considering it a private API.
|
|
|
|
|
| |
Also simplified the logic under the assumption that a false-ish object
won't have an exception_reporter_filter attribute.
|
|
|
|
|
| |
This provides the opportunity to move utility functions specific to the
Django Template Language outside of django.template.loader.
|
|
|
|
| |
refs #23395.
|
|
|
|
|
|
| |
bad input.
This limits large variables and avoids non-utf-8 in the TECHNICAL_500 output.
|
|
|
|
|
|
|
|
| |
Added a class to wrap callable in settings:
* Not to call in the debug page (#21345).
* Not to break the debug page if the callable forbidding to set attributes (#23070).
Thanks @bmispelon for giving me some advice.
|
|
|
|
|
|
| |
template if Http404 is raised.
Thanks Keryn Knight for the suggestion.
|
|
|
|
|
|
|
|
| |
SuspiciousOperation is raised and DEBUG=True
Thanks GDorn and gox21 for report.
Thanks Tim Graham for idea and review.
|
|
|
|
|
| |
Fixes a regression introduced in 5f24cf9705. Refs #22635.
Thanks A.J. May for spotting the regression.
|
| |
|
|
|
|
| |
firstof template tags.
|
| |
|
| |
|
|
|
|
|
|
| |
Commit 79558c78 cleaned up the (undocumented) interface of Resolver404
exception, which breaks compatibility with code messing with .args[0]
directly. Revert the cleanup part and simply leave the fix itself.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When django.core.urlresolvers.resolve was called from a view, failed
and the exception was propagated and rendered by technical_404_response,
the URL mentioned on the page was the current URL instead of the URL
passed to resolve().
Fixed by using the path attribute from the Resolver404 exception instead
of request.path_info. Also cleaned up the exceptions to use standard
named parameters instead of stuffing a dict in args[0]
|
|
|
|
|
|
| |
in favor of import_string().
Thanks Aymeric Augustin for the suggestion and review.
|
|
|
|
|
|
|
| |
The last component of the dotted path to the application module is
consistently referenced as the application "label". For instance it's
AppConfig.label. appname could be confused with AppConfig.name, which is
the full dotted path.
|
|
|
|
|
|
|
| |
URLconf detection code.
Thanks to @dmyerscoug for the report and original patch
and to @alasdairnicol for the added tests.
|
| |
|
|
|
|
| |
Thanks productions@zaziork.co.uk for the review.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
debug page.
Thanks to crass for the report.
|