#8648: Admin ignores to_field on ForeignKey
-----------------------------+----------------------------------------------
 Reporter:  kmtracey         |       Owner:  nobody    
   Status:  new              |   Milestone:  1.0       
Component:  Admin interface  |     Version:  SVN       
 Keywords:                   |       Stage:  Unreviewed
Has_patch:  0                |  
-----------------------------+----------------------------------------------
 As reported here: http://groups.google.com/group/django-
 users/browse_thread/thread/47d31f56c1924cfa#

 With current (I'm running [8661]) admin, for a model specified like so:

 {{{
 class Inventory(models.Model):
    barcode = models.PositiveIntegerField(unique=True)
    parent = models.ForeignKey('self', to_field='barcode', blank=True,
 null=True)
    name = models.CharField(blank=False, max_length=20)
    def __unicode__(self):
       return self.name
 }}}

 The admin treats 'parent' as though it refers to the pk field, not the
 barcode field.

 Old admin (0.96) handled this properly, that is it showed information for
 the related model that matched on the barcode field, not the pk field.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8648>
Django Code <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