I have a TaskForm that contains a DateField.  If I create my form from
an instance of a Task, I find that when I render the DateField field,
the value argument to render() is an actual datetime.date object.
However, if I create my form from POST data, the value argument to
render() is just a unicode string for the date - ie, whatever the user
typed in.

I want to render my date with a class of "late" if the date is in the
past.   Is it good practice to just have the render() method look at
the value and if it's a unicode string, just turn it into a date
object in order to do the compare?   This seems somehow wrong to me,
so I'm just wondering if I'm missing something.

Thanks,

Margie

--

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


Reply via email to