﻿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
23779	Can't use unique_together if one of the fields is in a mixin	Tom Carrick	nobody	"Slightly related to https://code.djangoproject.com/ticket/16732

I have a mixin:


{{{
class PublishableMixin(object):
    publish_date = models.DateTimeField()
}}}


and a model I wish to use it in:


{{{
class Article(PublishableMixin, models.Model):
    slug = models.SlugField()

    class Meta:
        unique_together = ('publish_date', 'slug')
}}}



This fails at the system check level:

news.Article: (models.E012) 'unique_together' refers to the non-existent field 'publish_date'.
"	Bug	closed	Database layer (models, ORM)	1.7	Normal	invalid			Unreviewed	0	0	0	0	0	0
