﻿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
14943	Meta attributes for Model refused to work with Mixin.	xuqingkuang	nobody	"Hi, I defined a mixin for global usage but it looks it's refused to working with unique_together meta attribute.

Code is following:

{{{
from django.db import models

class CommonModelMixin(object):
    name = models.CharField(max_length=1024)
    description = models.TextField()
    creator = models.ForeignKey('auth.User', blank=True, null=True, default=None, editable=False)
    creation_date = models.DateTimeField(auto_now_add=True)

class Data(CommonModelMixin, models.Model):
    product = models.CharField(max_length=1024)
    class Meta:
        unique_together = ('product', 'name')

class Order(CommonModelMixin, models.Model):
    is_active = models.BooleanField(default=True)
    class Meta:
        ordering = ['is_active', 'name']
}}}

But when syncdb it just report:

{{{
$ ./manager.py syncdb
Error: One or more models did not validate:
app.data: ""unique_together"" refers to name, a field that doesn't exist. Check your syntax.
app.order: ""ordering"" refers to ""name"", a field that doesn't exist.
}}}

I won't to inherit the mixin class from models.Model, because I have other mixins need to define, but it breaks the logical.

Any idea about it ?
"		closed	Database layer (models, ORM)	1.2		invalid			Unreviewed	0	0	0	0	0	0
