﻿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
7904	Manager 'get' overloading now fails / Accessing single related (parent) objects should not bypass manager	magneto	nobody	"The fix to Issue #7666  caused Manage overloading for ""get"" to fail (rather it now fails to use the overloaded method)

{{{
from django.db import models 

class M1Manager(models.Manager):
   def get(self, *args, **kwargs):
       """""" over load 'get' to allow for more fined tuned actions """"""
       #in this trivial example, all gets return none
       return None

class M1(models.Model):
    col1 = models.CharField(max_length = 30)
    objects = M1Manager()
	
    __unicode__(self):
         return col1
	 
class M2(models.Model):
    m1 = models.ForeignKey(M1)
    col2 = models.CharField()



my_m1 = M1.objects.create(col1=""m1_obj"")
my_m2 = M2.objects.create(m1 = my_m1, col2=""my_m2"")

find_m2 = M2.objects.get(col2 = ""my_m2"")
#prints ""m1_obj"" and should print None
print find_m2.m1

}}}


"		closed	Core (Other)	dev		fixed		Maniac@…	Unreviewed	1	0	0	0	0	0
