On 2/28/07, akaihola <[EMAIL PROTECTED]> wrote:
>
> It must be a common need to allow the user to change only some fields
> of an object and keep old values for the rest.
>
> So far with newforms this has involved copying values explicitly from
> the database object to the form object. Looking at newforms code I
> realized that a cleaner way is to just not try to copy missing fields
> from the form object to the database object before saving.
>
> For one possible solution, see 
> http://akaihola.blogspot.com/2007/02/django-newforms-improvement.html
> for details and the code.
>
> The code is based on newforms.models and makes minimal changes to
> form_for_instance (and its helper functions) to achieve the new
> functionality.
>
> If this new behaviour doesn't violate the intentions behind newforms,
> could it be adapted into Django?

I've written similar code, and that functionality definitely belongs
in Django. The best way to get it considered for inclusion is to file
a patch with docs and tests. You may want to propose the syntax on
django-developers first, however.

http://www.djangoproject.com/documentation/contributing/#submitting-patches

Joseph

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to