This makes assigning roles easier in the Admin panel. Currently in python3 only Role(<id>) is shown since __unicode__ is not called in python3. According to this: https://docs.djangoproject.com/en/1.10/topics/python3/#str-and-unicode-methods, this is the way you get it to work in both worlds. Works for me in python3, haven't tested in python2
Coverage increased (+0.03%) to 90.764% when pulling 28861519d7d33945016f56d1e53bd89fc2d6b5ee on benrudolph:br/py3-str into 07359d6f53e3366aeec1aa58030fa58ca0458128 on dimagi:master.
This makes assigning roles easier in the Admin panel. Currently in python3 only
Role(<id>)
is shown since__unicode__
is not called in python3. According to this: https://docs.djangoproject.com/en/1.10/topics/python3/#str-and-unicode-methods, this is the way you get it to work in both worlds. Works for me in python3, haven't tested in python2@millerdev