django-field-history icon indicating copy to clipboard operation
django-field-history copied to clipboard

UnicodeDecodeError with Python 2.7 and unicode string

Open slyapustin opened this issue 8 years ago • 1 comments

This does not work, if object representation have type unicode:

return '{} field history for {}'.format(self.field_name, self.object)

fix for python 2.7:

return u'{} field history for {}'.format(self.field_name, self.object)

https://github.com/grantmcconnaughey/django-field-history/blob/master/field_history/models.py#L31

slyapustin avatar Oct 31 '16 21:10 slyapustin

Same problem here: Python 2.7.10, Django 1.11.5 I tried to fixed it (PR on going), but it seems that it fails with Python 3.2

soloiago avatar Oct 18 '17 12:10 soloiago