Opened 15 years ago

Closed 15 years ago

#13143 closed (invalid)

filter_horizontal & filter_vertical widgets does not work if verbose_name contains non-ascii characters

Reported by: EkremSEREN Owned by: nobody
Component: Uncategorized Version: 1.1
Severity: Keywords: filter_horizontal, filter_vertical
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

filter_horizontal & filter_vertical widgets does not work if verbose_name contains non-ascii (or maybe Turkish, I'm not sure) characters.

Doesn't work

class SomeModel(models.Model):
    name = models.CharField(max_length=30)
    books = models.ManyToManyField(SomeOtherModel, verbose_name='this does not work -- şüğöç')

Does work

class SomeModel(models.Model):
    name = models.CharField(max_length=30)
    books = models.ManyToManyField(SomeOtherModel, verbose_name='this works')

Change History (1)

comment:1 by Russell Keith-Magee, 15 years ago

Resolution: invalid
Status: newclosed

This is an unusual presentation, but the issue here is that you have non-ascii characters in a bytestring. Make verbose_name a unicode string and give your models.py file a PEP-263 encoding, and your example works fine.

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