Hi all,

I'm a Django newbie  trying to learn this wonderful framework, so if
my question is too obvious, please bear with me :-)

I'm learning how to use the newforms from Django 0.96, as it comes
installed on a Debian GNU/Linux Lenny (testing), I'm playing around
with the SpliDateTimeField:

-------------------------------------------------------------------------------------------------
class GraphForm(forms.Form):
    from_date = forms.SplitDateTimeField(widget=forms.SplitDateTimeWidget)
    to_date = forms.SplitDateTimeField(widget=forms.SplitDateTimeWidget)

def graph(request):
    if request.method == 'POST':
        f = GraphForm(request.POST)
    else:
        now = datetime.now()
        f = GraphForm(initial={'from_date': now - timedelta(0, 8*3600),
                               'to_date': now})
    return render_to_response('app.html', {'form': f})
-------------------------------------------------------------------------------------------------

When I load the webpage, I get the two SplitDateTimeField fields
correctly, with the initial values on them correctly...the only
curious detail is that the time field is something like
"12:53:58.988741", so when I click on the submit button (which reloads
the same webpage with POST method), I gey a time validation error.
If I edit the time field and remove the millionths of a second, like:
"12:53:58"...the form correctly validate the time.

So my question is: Is this a bug? Or I shall customize the time output
format in some way?

Thanks in advance
-- 
Lucas Di Pentima - http://lucas.di-pentima.com.ar
GnuPG Public Key:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6AA54FC9
Key fingerprint = BD3B 08C4 661A 8C3B 1855  740C 8F98 3FCF 6AA5 4FC9

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to