Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#23060 closed Bug (fixed)

UnicodeDecodeError in debug templatetag

Reported by: anonymous Owned by: QingFeng
Component: Template system Version: 1.7-rc-1
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: yes UI/UX: no

Description

There is model with __unicode__ method that return unicode with cyrillic.
Instance of this model used in template as context.
If use {% debug %} then get UnicodeDecodeError exception.
Please fix it.

Attachments (1)

23060.diff (538 bytes) - added by QingFeng 4 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by Claude Paroz

Easy pickings: set
Triage Stage: UnreviewedAccepted

comment:2 Changed 4 years ago by QingFeng

Owner: changed from nobody to QingFeng
Status: newassigned

Changed 4 years ago by QingFeng

Attachment: 23060.diff added

comment:3 Changed 4 years ago by QingFeng

pullrequest: https://github.com/django/django/pull/2933

pls, review, thanks

comment:4 Changed 4 years ago by Claude Paroz

Has patch: set
Needs tests: set
Patch needs improvement: set

I left some comments on the pull request. Also tests are needed.

comment:5 in reply to:  4 Changed 4 years ago by QingFeng

Replying to claudep:

I left some comments on the pull request. Also tests are needed.

OK, I added a test, this test in which directory is better? thanks

comment:6 Changed 4 years ago by Claude Paroz

Template tags/filters tests are located in tests/template_tests.

comment:7 Changed 4 years ago by QingFeng

@claudep send a new pr https://github.com/django/django/pull/2976 , pls, review, thanks

comment:8 Changed 4 years ago by Claude Paroz <claude@…>

Resolution: fixed
Status: assignedclosed

In 08451f17d08486055542daecdcc3be1779f0815b:

Fixed #23060 -- Prevented UnicodeDecodeError in debug templatetag

comment:9 Changed 4 years ago by Claude Paroz <claude@…>

In 3a2badcbb73c2aed6451d2451da1c4fc8d934ab2:

[1.7.x] Fixed #23060 -- Prevented UnicodeDecodeError in debug templatetag

Backport of 08451f17d0 from master.

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