[IronPython] Django, __unicode__, and #20366

Jeff Hardy jdhardy at gmail.com
Sun Jan 31 02:21:27 CET 2010


Hi all,
I've got a question regarding __unicode__ and issue #20366[0]. Django
explicitly encourages the use of __unicode__ on models[1], which would
not be available on IronPython. Also, they have some lazy evaluation
functions that depend on differences between str and unicode, and
default to using __unicode__. Now, these differences could be worked
around in Django, but I wonder if that's the right place for them. I
also have no idea how this will play out under 3.0.

I'm working around by checking `str is unicode`; I'm not sure there's
really a better option.

- Jeff


[0] http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=20366
[1] http://docs.djangoproject.com/en/1.1/ref/models/instances/#django.db.models.Model.__unicode__



More information about the Ironpython-users mailing list