Are you using 0.96 (you're using __str__ so I'd guess you are)? Django's ugettext was introduced in the unicode merge that occured after 0.96's release.
On Mar 10, 12:18 am, Tim Adler <[EMAIL PROTECTED]> wrote: > Hey everybody, > > I'm trying to added mptt to my django project for managing a simple > page-tree. It doesn't seem to work, as it is supposed too. > > My model looks like this: > > from django.db import models > import mptt > > class Page(models.Model): > title = models.CharField(maxlength=200) > body = models.TextField() > parent = models.ForeignKey('self', null=True, blank=True, > related_name='pages') > > class Meta: > ordering = ['parent'] > > class Admin: > pass > > def __str__(self): > indent = "" > for i in range(self.lvl()): > indent += "-" > > return '%s %s' % (indent,self.title) > > def level(self): > if(self.parent == None): > return 0 > else: > return self.parent.lvl() + 1; > > But even in this stage, without the mptt.register, my development > server gives me a > > > Validating models... > > djangotree.content: cannot import name ugettext > > 1 error found. > > I guess that is related to the mptt, but I have no idea, what might be > causing this. > Can somebody help out? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---