﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
14124	Cannot use a proxy model with unique_together	mlhamel	nobody	"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."""		new	Uncategorized	1.2					Unreviewed	0	0	0	0	0	0
