home / django_tickets / tickets

tickets: 8648

This data as json

id created changetime last_pulled_from_trac stage status component type severity version resolution summary description owner reporter keywords easy has_patch needs_better_patch needs_tests needs_docs ui_ux
8648 2008-08-28 16:08:17 2011-09-28 16:12:17 2022-03-06 03:42:48.436630 Accepted closed contrib.admin     dev fixed Admin ignores to_field on ForeignKey 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. nobody kmtracey   0 1 0 0 0 0
Powered by Datasette · Queries took 1.795ms