[patch][magic-removal] Admin display for OneToOneField is broken
|Reported by:||jkocherhans||Owned by:||adrian|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
OneToOneField (without raw_id_admin=True) should have an html select field as an input widget in the admin system, but it's using a text input. The input's value attibute is empty on the change form as well.
Also, if even if you do use raw_id_admin-True, the value attribute of the input tag is empty on the change form.
I think a couple of methods from ForeignKey ought to be moved up to the RelatedField class so OneToOneField inherits them as well... I'll look into this more.
from django.contrib.auth.models import User from django.contrib.sites.models import Site class UserSite(models.Model): user = models.OneToOneField(User) # admin broken w/ or w/o raw_id_admin=True site = models.ForeignKey(Site)
Change History (7)
comment:3 Changed 9 years ago by jkocherhans
- Summary changed from [magic-removal] Admin display for OneToOneField is broken to [patch][magic-removal] Admin display for OneToOneField is broken
Changed 9 years ago by jkocherhans
comment:4 Changed 9 years ago by jkocherhans
- Resolution set to fixed
- Status changed from new to closed