#15503: Admin readonly_fields should have a hidden field
------------------------------------------------+---------------------------
Reporter: dahool | Owner: nobody
Status: closed | Milestone:
Component: django.contrib.admin | Version: 1.2
Resolution: invalid | Keywords:
readonly_fields
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 |
------------------------------------------------+---------------------------
Changes (by russellm):
* status: reopened => closed
* resolution: => invalid
Comment:
Django is doing exactly what you're asking it to do. You've subclassed
UserAdmin, which specifically installs custom forms to ensure the user
object is correctly validated. When you then remove username from the
available data, the custom form fails validation.
If you subclass admin.ModelAdmin instead of UserAdmin, you won't see this
problem, because the auto-generated form *will* obey the readonly_fields
clause.
--
Ticket URL: <http://code.djangoproject.com/ticket/15503#comment:3>
Django <http://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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.