theatlantic/django-select2-forms

unicode problem

zachross25 opened this issue · 1 comments

related_name=_('name')

related.py", line 1782, in contribute_to_related_class
setattr(cls, related.get_accessor_name(), self.related_accessor_class(relat
d))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-4: ordi
al not in range(128)

I'm assuming that _ is either django.utils.translation.ugettext or django.utils.translation.ugettext_lazy. You shouldn't be using localization for the related_name. Read the Django documentation about what related_name is for.