#20861 closed Bug (fixed)

500 status code debugging view shouldn't localize numeric tags IDs/line numbers

Reported by: ramiro Owned by: nobody
Component: Utilities Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Contributor Kronuz opened a pull request (https://github.com/django/django/pull/451) with a proposed fix to the issue.

I've added tests here: https://github.com/django/django/pull/1437

One thing missing in the proposed fix was importing the l10n template tag library (the one that contains the unlocalize filter) and this stopped me from merging the PR right away.

Until now the template is pretty self-contained and lean, e.g. it doesn't import template tag libraries (I suspect to minimize the risk of triggering other problems when trying to show a helpful version of the server error exceptions.)

Should I ignore all this and simply commit the fix?

Change History (2)

comment:1 Changed 21 months ago by ramiro

  • Has patch set
  • Triage Stage changed from Unreviewed to Accepted

New, less invasive (IMHO) strategy: Specify use_l10n=False when constructing the Context for the debug view. PR updated.

I plan to commit this soon.

Last edited 21 months ago by ramiro (previous) (diff)

comment:2 Changed 21 months ago by Ramiro Morales <cramm0@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 6c12cd15e990b0ff5a5e85328f0a092f4bfe8080:

Unlocalize line numbers and ids in debug 500 view.

While using USE_L10N, line numbers and IDs were printed as comma (or
locale equivalent) separated values.

Thanks Kronuz for the report and intial patch.

Fixes #20861.

Note: See TracTickets for help on using tickets.
Back to Top