Opened 5 years ago

Last modified 5 years ago

#30779 closed Cleanup/optimization

technical_500.html: use filename:lineno format for exception location — at Version 5

Reported by: Daniel Hahler Owned by:
Component: Error reporting Version: dev
Severity: Normal Keywords:
Cc: Hasan Ramezani Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Mariusz Felisiak)

Using

Exception Location: 	…/dj/views.py, line 28, in form_valid

instead of

Exception Location: 	…/dj/views.py in form_valid, line 28

would allow for easier copy'n'paste of the location for going there in an editor.

The format fname:lnum is usually handled there to go to the line number there directly.

By default this does not work as good as it could then, since browsers will not include the ":" on double-click (tested Firefox and qutebrowser), but the "text-select" CSS property can be used for this, which then selected it with a single click already. Ref: https://developer.mozilla.org/en-US/docs/Web/CSS/user-select

https://github.com/django/django/pull/11789

Change History (5)

comment:1 by Daniel Hahler, 5 years ago

Description: modified (diff)
Has patch: set
Patch needs improvement: set

comment:2 by Carlton Gibson, 5 years ago

Triage Stage: UnreviewedAccepted

Hey Daniel. Yes, sounds like a nice gain. I am certainly happy to review a PR on it. :) Thanks.

comment:3 by Daniel Hahler, 5 years ago

Thanks Carlton.

Please see https://github.com/django/django/pull/11789 then.
It probably only needs test adjustments, which I'd like to do only in the end.

comment:4 by Hasan Ramezani, 5 years ago

Cc: Hasan Ramezani added
Patch needs improvement: unset
Last edited 5 years ago by Mariusz Felisiak (previous) (diff)

comment:5 by Mariusz Felisiak, 5 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top