#15503: Admin readonly_fields should have a hidden field ------------------------------------------------+--------------------------- Reporter: dahool | Owner: nobody Status: reopened | Milestone: Component: django.contrib.admin | Version: 1.2 Resolution: | Keywords: readonly_fields Triage Stage: Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | ------------------------------------------------+--------------------------- Changes (by dahool):
* status: closed => reopened * resolution: invalid => Comment: '''How to reproduce:''' admin.py --------------------------------------------------- from django.contrib.auth.admin import UserAdmin admin.site.unregister(User) class UserAdminForm(UserAdmin): readonly_fields = ('username',) admin.site.register(User, UserAdminForm) --------------------------------------------------- Try to edit any user I you'll get a message like '''Please correct the error below.''' See [[Image(http://i54.tinypic.com/2m7gac9.png)]] If having a hidden field is not an option, then this fields shouldn't be validated. -- Ticket URL: <http://code.djangoproject.com/ticket/15503#comment:2> 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 django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.