On Sep 6, 9:43 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Sat, Sep 6, 2008 at 8:40 AM, Denis Frère <[EMAIL PROTECTED]> wrote:
> > Why LinkForm(request.POST, instance=link) doesn't behaves like
> > link.update(request.POST) ?
>
> it doesn't behave that way because it'd make no sense to behave that
> way; if there's a field in a form and it gets no data, then the form
> has _no data_ for that field. Not "keep the existing data", not "make
> a guess about what this means", just "I have no data for this field".
> And the only thing to do with no data is to blank the field.

I completely agree with you in the case I use a field in a html form
and let the field blank.
But when I don't use a field in the html form, whether that field
exists in the Django form or not, then that field doesn't exist in the
QueryDict.
It's not a question of "no data for a field", it's a question of
"missing field" in the request.POST dict. It doesn't mean "I have no
data for this field", it means "that field has been left untouched".

Let's say that I see it that way because I have a "html-form-point-of-
view" and you seem to have a "Django-form-point-of-view".

Anyway, that's not a big problem since I can write a Django form
whitch excludes that field. You're the boss and you set the rules and
I'm happy to use Django even if I disagree on some small points. You
made a great job, it's really a very nice framework !

Thanks for your answer.

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