On Fri, 2007-05-25 at 17:17 +0200, Michael Radziej wrote: > Hi Malcolm, > > A short disclaimer: I'm currently trying the unicode branch with the > autoescape patch and a > couple of other patches, so my problems might really be my own problems, > but I don't expect it. > > > 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). > > -*- > > 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. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---