When editing an object, I find it strange that untouched values are
set to blank.

Let's say I have a link object with a date_created field. When I use a
default LinkForm to edit my links, if I don't exclude the date_created
field, that field is set to blank if I don't use that field in my
template (am I clear enough ?)

I would have expected a behaviour like dict.update() in Python :

>>> my_d = {'one': 1, 'two': 2, 'four': 4}
>>> other_d = {'three': 3, 'two': 'II'}
>>> my_d.update(other_d)
>>> for key in my_d.keys():
...     print key, my_d[key]
four 4
three 3
two II
one 1

Why LinkForm(request.POST, instance=link) doesn't behaves like
link.update(request.POST) ?
Is it a will or an "omission" ?

Thanks,

Denis


--~--~---------~--~----~------------~-------~--~----~
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