#24908: Overridden field in modelform used in modeladmin which name is returned 
by
get_readonly_fields
-------------------------------+--------------------
     Reporter:  jpic           |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  contrib.admin  |    Version:
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 A Model ForeignKey field will appear twice in the admin if the following
 conditions are met:

 - its ModelAdmin uses a custom ModelForm,
 - the ModelForm overrides that field,
 - its ModelAdmin.get_readonly_fields returns that field in edit mode.

 Example:
 https://github.com/jpic/double_readonly_field/raw/master/demo.png

 Test project reproducing this issue:
 - https://github.com/jpic/double_readonly_field

 Related:
 - https://github.com/yourlabs/django-autocomplete-light/issues/235
 - https://github.com/yourlabs/django-autocomplete-light/issues/440

--
Ticket URL: <https://code.djangoproject.com/ticket/24908>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/047.5fc6ec5a526909ea87259ae637f7c29a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to