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

Fixed #28935 -- Fixed display of errors in extended blocks. #14367

Merged
merged 1 commit into from
Jul 2, 2021

Conversation

cammil
Copy link
Contributor

@cammil cammil commented May 7, 2021

Fixed #27694 -- Exception debug info on correct template.

@cammil cammil marked this pull request as ready for review May 7, 2021 21:23
@jacobtylerwalls
Copy link
Member

Hi @cammil can you update this PR with the correct ticket number? Thanks. And please make sure the ticket links to the PR also.

@cammil cammil changed the title Fixed #27694 -- Exception debug info on correct template. Fixed #28935 -- Exception debug info on correct template. May 29, 2021
@cammil
Copy link
Contributor Author

cammil commented May 29, 2021

@jacobtylerwalls Sorry for the wrong ticket number. Not sure how that happened! I've updated title with the correct number. TIcket links back to this PR correctly now.

@felixxm felixxm changed the title Fixed #28935 -- Exception debug info on correct template. Fixed #28935 -- Fixed display of errors in extended blocks. Jul 2, 2021
Copy link
Member

@felixxm felixxm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cammil Thanks for this patch 👍

I pushed small edits.

tests/template_tests/tests.py Outdated Show resolved Hide resolved
Get the template that caused the exception and get the
exception info from that template, using the node that
caused the exception.
@felixxm felixxm merged commit 313c3d1 into django:main Jul 2, 2021
@cammil cammil deleted the ticket_27694 branch July 2, 2021 10:39
@MalikRumi
Copy link

First, thanks to all of you for this fix. I had the same problem and went to the bug reporter and found this. However, I note that version 3.2.5 was released July 1, and this patch was committed July 2, but the release of 3.2.6 says nothing about this patch in the bugfixes. So if I upgrade to 3.2.6 will I get this patch or not? If not, when, and if not soon, how easy / hard do I apply it myself?

@jacobtylerwalls
Copy link
Member

Hi @MalikRumi, the ticket being fixed was reported in 2017. We regularly merge patches fixing long-standing bugs, but unless the bugs were introduced in the last version of Django (3.2) or affect security or data loss, they aren't backported, which is to say, it will be included in Django 4.0 only.

Django 4.0 alpha comes out in about a month, then a beta, then final release early December (timeline). (You can pin to the main branch if you need the latest merged pull requests, but I believe the official recommendation is not to run unreleased versions in production. YMMV)

@MalikRumi
Copy link

hmmm. Ok, well, before I found this bug report, I was thinking about writing a custom error. In my immediate use case, the error is being called when I try to bring up a list of objects. But the NoReverseMatch error references a detail page. There are a lot of detail pages (url tags) on this list, so not knowing exactly which one is causing the problem, and why, means some slow and painful one - at - a - time checking. Would it be possible to write a custom error that would bring me this information? I'm not sure exactly how I would do that, and I don' expect you to write me a tutorial, but if you can point me to some good resources for how to go about it in this situation, that would be great. Thanks.

@cammil
Copy link
Contributor Author

cammil commented Sep 22, 2021

@MalikRumi If you look at the PR the actual code change is pretty straightforward, so you could just modify your installed django.

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.

4 participants