[Zope-dev] Collector issue #30: Empty dates
Lennart Regebro
lennart@torped.se
Tue, 19 Mar 2002 10:30:22 +0100
From: "Brian Lloyd" <brian@zope.com>
> I agree. I'd specify this by saying:
>
> o An empty string sent from a browser for an optional_date
> field is interpreted as a null (not specified) value
>
> o The "internal" representation of an optional_date (the
> value you find in the REQUEST after conversion) is
> always either a valid DateTime instance or None
I think then the value in the fields will be shown as "None", which I don't
particularily like, even though I would rather have None as the internal
representation instead of an empty string. Is there a way to fix that, so
that date_fields set to None will be displayed as empty?
> I don't have much to add to that thread. It has the same
> backward-compatibility issue, but I don't perceive it to
> be as big an issue as the date thing (probably because
> it can be dealt with in a single line from DTML or Python).
True, it can wait. We probably need to discuss how all of this should be
handled in Zope 3 at some time, because it is a bit confusing today (thanks
mostly to the m*r*ns that made the HTML forms specification), and it easy to
mix up optional, empty and non-existent. :-) But thats another discussion.