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

Add a MinimalDjangoError, for cases when you don't have a request. #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomokas
Copy link
Contributor

@tomokas tomokas commented Dec 12, 2016

Not much more to this than the PR title.

The motivation for this PR was an internal patch to Django, to send Exceptions which occur while rendering an included template to KeyError (instead of just logging them), i.e. modifying https://github.com/django/django/blob/master/django/template/loader_tags.py#L213-L230 . Accessing the request instance at that time isn't possible. I suppose you could find the request via sys._getframe hacks, but this feels cleaner.

@PeterJCLaw
Copy link
Contributor

@tomokas care to update this PR to resolve the conflicts? (I suspect they're minimal)

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