#29894: Read-only fields in ModelAdmin should not be placed at the end
-----------------------------------------+--------------------------
               Reporter:  Jannik Schürg  |          Owner:  nobody
                   Type:  New feature    |         Status:  new
              Component:  contrib.admin  |        Version:  master
               Severity:  Normal         |       Keywords:  readonly
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+--------------------------
 Code example:

 {{{#!python
 class MyModel(models.Model):
     prop1 = models.CharField(max_length=255)
     prop2 = models.CharField(max_length=255)

 @admin.register(MyModel)
 class MyModelAdmin(admin.ModelAdmin):
     readonly_fields = ('prop1',)
 }}}

 Then, in admin the field `prop1` is added at the end. Especially for
 models with many fields and dynamic readonly fields through
 `get_readonly_fields` the bahavior is unexpected. Instead, the read-only
 fields should replace their editable fields and stay in order.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29894>
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/051.2b2a9f2c2e57ebe240f06da4bb069de5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to