#11750: ManyToMany field does not respect Proxy models
------------------------------------------+---------------------------------
 Reporter:  mxposed                       |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  1.1       
 Keywords:  manytomany proxy              |       Stage:  Unreviewed
Has_patch:  0                             |  
------------------------------------------+---------------------------------
 Hi

 I have a proxy model above django.contrib.auth.models.User
 and i have a ManyToMany field referencing to
 django.contrib.auth.models.User

 When i try to add an instance of my proxy class to the field i get the
 TypeError: 'user' instance expected

 {{{
 class MyUser(User):
      class Meta:ΒΆ
          proxy = True

 class Item(models.Model):
     owners = models.ManyToManyField(User)

 Item.objects.get(fk=1).owners.add(MyUser.objects.get(fk=1))
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/11750>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to