﻿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
7505	Abstract class managers have .model pointing to the Abstract rather than the real class	tie	nobody	"Consider this example:

{{{
from django.db import models

class CustomManager(models.Manager):
    def get_query_set(self):
        print ""My model is: "", self.model
        return super(CustomManager, self).get_query_set()

class Abstract (models.Model):
    class Meta:
        abstract = True
    objects = CustomManager ()

class Place(Abstract):
    name = models.CharField(max_length=50)
    address = models.CharField(max_length=80)

}}}

When this code is evaluated in ./manage.py shell, we get:
{{{
>>> models.Place.objects.model
<class 'demoproject.gentest.models.Abstract'>

>>> Place.objects.all()
My model is:  <class 'demoproject.gentest.models.Abstract'>
}}}

The normal behavior would be models.Place.objects.model to point to the ""real"" class - <class 'demoproject.gentest.models.Place'>"		closed	Database layer (models, ORM)	dev		duplicate	qsrf-cleanup abstract model manager		Unreviewed	0	0	0	0	0	0
