#3427: newforms: add readonly support to widgets
-------------------------+--------------------------------------------------
Reporter: anonymous | Owner: adrian
Status: reopened | Component: django.newforms
Version: SVN | Resolution:
Keywords: | Stage: Design decision needed
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
-------------------------+--------------------------------------------------
Changes (by [EMAIL PROTECTED]):
* status: closed => reopened
* resolution: wontfix =>
Comment:
Is it really so hairy?
Why not just use the disabled and NOT do the hidden input thing. Disabled
in IMHO is a better way to specify read-only stuff on a form, since it
means that the input won't be submitted as part of the form. People who
expect it to always be submitted as part of the form need the hidden input
because of this, but its better to write server-side code such that it
knows NOT to expect a value for such a disabled field.
Because... of the following scenario:
1. user GETs your page with a form in it, containing inputs marked
readonly
2. user saves the html locally
3. user edits the form, removing the readonly attributes
4. user submits the edited form, and since your server-side code does not
check that the values should not change, the user bypasses the fact that
you made them read-only
-i
--
Ticket URL: <http://code.djangoproject.com/ticket/3427#comment:3>
Django Code <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
-~----------~----~----~----~------~----~------~--~---