Hi Malcolm! On Sat, May 26, Malcolm Tredinnick wrote: > On Fri, 2007-05-25 at 17:17 +0200, Michael Radziej wrote: > > First, I found that I have a problem with commit 5255 together with the test > > client. It breaks loading the modules, probably due to recursive imports. > > > > - management activates translation > > - this loads all apps > > - One of my apps loads the test Client (I'm use a different testing > > framework that uses the django test client) > > - test client loads contrib.session > > - the model meta class starts translation in contribute_to_class > > - this loads all apps --> doesn't work > > > > I moved the import statement in my app into the function --> works. > > > > I suggest to change the test client so that it imports other models > > only in a function and not at compile time. > > Fixed at the source of the problem (django.db.models.options) in [5345]. > At least, I'm pretty sure that will fix it. Let me know if the problem > persists (and why, because then it's not as you describe).
Very nice, I can confirm that it works. > > Second, I have a map of view tags, verbose names for these and how to build > > the url (it was born before the regex reverser). This map uses gettext_lazy > > for the verbose names, which is used later with the % operator. This fails > > because > > > > In [44]: "%s" % gettext_lazy("Dienste") > > Out[44]: '<django.utils.functional.__proxy__ object at 0xb70dacac>' > > > > With proper unicode objects, though, it works: > > > > In [45]: u"%s" % ugettext_lazy("Dienste") > > Out[45]: u'Services' > > > > (It really requires both that the pattern is unicode and that ugettext_lazy > > is > > used and not gettext_lazy) > > > > I'm now working to work around this, but it's a lot of replacements from > > "gettext_lazy" --> "ugettext_lazy" and also to promote all the patterns to > > unicode. > > Fixed in [5344]. '%s' % gettext_lazy('Dienste') will do what you expect > now. That's terrific! I already had resigned myself with boring hours to change hundreds of strings to unicode! Should we ever meet in person, that's one beer, at least ;-) BTW, are you aware that unicode will finally retire mysql_old? I'll now switch to mysql and then continue testing. Michael --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---