simonbun wrote:
If editable=False is specified in the model, then I personally would
expect it not to show up in the form_from_model form either.

On the other hand, I'm not so sure that the need to differentiate the
editable option between the admin contrib and plain form_from_model is
so general. Not for it to warrant an addition to the admin class api at
least. Off the top of my head i can't think of common uses for it, but
feel free to give some examples.

Well, I have many forms where there are fields I want to show in the
admin interface, but not on forms users see.  A coworker and I recently
built a form-building framework where we resorted to adding a couple
hooks in our view code to post-process the Manipulator/FormWrapper to
not remove certain fields when displaying the form and to post-process
the user's POST data to ensure they cannot put data in those specified
fields.

I do agree that an editable=True/False parameter in the model field
should apply to all forms created from the model.  If the admin
interface needs something different, then there needs to be a way to
describe it in class Admin.  I think Adrain might have mentioned
something about this with newforms, but I can't recall what or where it
was.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django 
developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to