In iommi we have a setting for building debug URLs that we default to pycharm. We use this to enable jumping from a page directly to that views source, from the list of templates to the source of that template, from any arbitrary template block tag to the specific line (Dev tools - iommi 7.19.0 documentation), and I think something else that I’m forgetting.
At work I also have a customized 500.html that uses this setting to make the line numbers clickable for templates, and the filenames clickable in the traceback part of the error page.
I think this kind of thing would be much better inside Django itself, what do you think? We’ve been using this in iommi for ~10 years now so we’re pretty confident about the general API design (which honestly is pretty trivial: specify a callback in settings that takes a filename and line number and returns a formatted url).