Opened 10 years ago

Closed 10 years ago

Last modified 10 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 10 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by Claude Paroz, 10 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted

comment:2 by QingFeng, 10 years ago

Owner: changed from nobody to QingFeng
Status: newassigned

by QingFeng, 10 years ago

Attachment: 23060.diff added

comment:3 by QingFeng, 10 years ago

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

pls, review, thanks

comment:4 by Claude Paroz, 10 years ago

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

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

in reply to:  4 comment:5 by QingFeng, 10 years ago

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 by Claude Paroz, 10 years ago

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

comment:7 by QingFeng, 10 years ago

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

comment:8 by Claude Paroz <claude@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In 08451f17d08486055542daecdcc3be1779f0815b:

Fixed #23060 -- Prevented UnicodeDecodeError in debug templatetag

comment:9 by Claude Paroz <claude@…>, 10 years ago

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