[IronPython] Django, __unicode__, and #20366
dinov at microsoft.com
Sun Jan 31 21:14:58 CET 2010
I'll take a look and see what breaks if we call __unicode__ when it's defined
when the user calls str/unicode.
> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Michael Foord
> Sent: Sunday, January 31, 2010 11:25 AM
> To: Discussion of IronPython
> Subject: Re: [IronPython] Django, __unicode__, and #20366
> On 31/01/2010 01:21, Jeff Hardy wrote:
> > Hi all,
> > I've got a question regarding __unicode__ and issue #20366. Django
> > explicitly encourages the use of __unicode__ on models, which
> > 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.
> There's *unlikely* to be an easy fix in IronPython any time soon,
> although I would love to be proved wrong. The Django team have
> *explicitly* said that they are open to patches (or even just bug
> reports) to make Django compatible with IronPython.
> > I
> > also have no idea how this will play out under 3.0.
> Django is not expecting to move to Python 3 for quite some time as I
> understand it.
> > I'm working around by checking `str is unicode`; I'm not sure there's
> > really a better option.
> That sounds like a good solution to me.
> > - Jeff
> > 
> I still think the partial-fix I suggest in that issue would be much
> better than the current situation...
> All the best,
> > 
> > _______________________________________________
> > Users mailing list
> > Users at lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> READ CAREFULLY. By accepting and reading this email you agree, on
> behalf of your employer, to release me from all obligations and waivers
> arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-
> service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-
> disclosure, non-compete and acceptable use policies ("BOGUS
> AGREEMENTS") that I have entered into with your employer, its partners,
> licensors, agents and assigns, in perpetuity, without prejudice to my
> ongoing rights and privileges. You further represent that you have the
> authority to release me from any BOGUS AGREEMENTS on behalf of your
> Users mailing list
> Users at lists.ironpython.com
More information about the Ironpython-users