Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve --fail-on-template-vars: use origin if available #470

Merged
merged 2 commits into from
May 16, 2017

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Mar 17, 2017

This will be there with Django 1.9+ always, and in case of
settings.TEMPLATE_DEBUG before. It also not go up to the Template,
but uses the nearest location (which is required with extending
templates).

Using django.template.base.Origin also gives the benefit of having the
full/absolute path.

btw: I suggested to not throw it with the default filter in Django in django/django#8200 - we might add it in pytest-django already / instead (if it gets not accepted in Django).

This will be there with Django 1.9+ always, and in case of
`settings.TEMPLATE_DEBUG` before.
It stops going up to the Template, but uses the nearest location (which
is required when extending templates).

Using `django.template.base.Origin` also gives the benefit of having the
full/absolute path.
@blueyed blueyed force-pushed the invalid-template-var-origin branch from c428f59 to 369e519 Compare April 17, 2017 11:16
@blueyed
Copy link
Contributor Author

blueyed commented Apr 17, 2017

Thanks for the review, squashed into two commits now.

@blueyed blueyed merged commit 95ac974 into pytest-dev:master May 16, 2017
@blueyed blueyed deleted the invalid-template-var-origin branch May 16, 2017 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants