Hi all, I've just used a proxy model in my own custom application and i've just found a small problem. Right now, to be able to create a Proxy model, i'm force to redefine a Meta options like that:
class NewDiscount(Discount): class Meta: proxy = True The problem i have is that the original discount object defined the following Meta options: class Discount(models.Model): class Meta: verbose_name = _("Discount") verbose_name_plural = _("Discounts") unique_together = ('slug', 'amount') Since i've overwritten the Meta class I should copy the original Meta options inside my Proxy model like that: class NewDiscount(Discount): class Meta: proxy = True verbose_name = _("Discount") verbose_name_plural = _("Discounts") unique_together = ('slug', 'amount') But, when I'm doing that, Django throw me an error saying: "store.discount: "unique_together" refers to site. This is not in the same model as the unique_together statement." It means that i can't add the unique_together clause in the Meta class cause the fields are not directly the property of my proxy model !!! How it's possible ? What should I do ? Mathieu Leduc-Hamel -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.