On Thu, Aug 28, 2008 at 4:34 AM, chr <[EMAIL PROTECTED]> wrote: > > hi. i've got a model like this: > > 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) > > and i get: > >>> i = Inventory.objects.get(barcode=115716) > >>> i > <Inventory: Apple Mighty Mouse> > >>> i.parent > <Inventory: Apple iMac> > > which is fine. whereas in the admin the select-widget will have the > item selected whose id accidentally matches the barcode. i.e. the > values in the select-widget aren't the values from barcode but the pk. > <option value="247">Apple Mighty Mouse</option> > > i couldn't find this behaviour in the admin documented anywhere. > > so, is the bug in my model, the lack of documentation or the admin? > > I believe it's a bug admin. I've opened a ticket:
http://code.djangoproject.com/ticket/8648 Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---