* easy: => 0
* stage: Accepted => Design decision needed
Comment:
I'm not convinced that read-only fields should systematically and
implicitly be hidden (or omitted) from the add form as, for example, one
may want to display read-only default values. Instead I would prefer to
let the admin offer more flexibility so that one could explicitly control
what fields are displayed in the add/change forms on a per-request basis.
For this reason I'm marking this ticket as DDN.
--
Ticket URL: <https://code.djangoproject.com/ticket/15611#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: jezdez (removed)
* owner: jezdez =>
--
Ticket URL: <https://code.djangoproject.com/ticket/15611#comment:10>
* stage: Design decision needed => Accepted
Comment:
The option to offer "more flexibility" didn't apper, and it doesn't look
like it will be implemented any time soon. Can we proceed with the bugfix?
--
Ticket URL: <https://code.djangoproject.com/ticket/15611#comment:11>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/15611#comment:12>
* needs_better_patch: 0 => 1
Comment:
Patch doesn't apply cleanly.
--
Ticket URL: <https://code.djangoproject.com/ticket/15611#comment:13>
Comment (by Tim McCurrach):
I think this can be closed now. We have `get_readonly_fields`, and
`get_fields` both of which accept an `obj` argument which will be `None`
in the case of an `add_view`. This allows you to completely customise what
fields you want to be readonly (or even present) for both `add_view` and
`change_view`.
--
Ticket URL: <https://code.djangoproject.com/ticket/15611#comment:14>
* status: new => closed
* needs_better_patch: 1 => 0
* has_patch: 1 => 0
* resolution: => fixed
* type: Bug => New feature
Comment:
Customization options are now available, and they are better than hiding
readonly fields all the time. Closing as "fixed".
--
Ticket URL: <https://code.djangoproject.com/ticket/15611#comment:15>