k88 kirjoitti: > Given the following models > > class Product(models.Model): > price = models.IntegerField() > > class Product1I18n(models.Model) > parent = models.ForeignKey(Product) > language = models.CharField(max_length=2) > title = models.CharField(max_length=255) > description = models.TextField() > > is it possible somehow to patch/override/extend/replace the Product > model to act as a ProductI18n when managers process/access it for the > db query creation ? > > My main concern is select (filter) queries, so that the following > statement: > > Product.objects.filter(price=10,language='en') > > to act as > > Product.objects.filter(price=10,producti18n_set__language='en') > > any suggestion ?
Have you looked at django-multilingual (in google groups)? It provides more or less automatic translation system. -- Jani Tiainen --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---