Continuation wrote:
> if form.is_valid():
>     object = form.save(commit=False)
>     delta = datetime.timedelta(days=object.days_difference)
>     object.end = object.start + delta
>     object.save()
> 
> But I got the error:
> type object 'datetime.datetime' has no attribute 'timedelta'

This sounds like a silly import error... It sounds like you've got 
something like:

from datetime import datetime

Where you really want just:

import datetime

(Because datetime.datetime.timedelta doesn't exist, but 
datetime.timedelta does.)

--
--Max Battcher--
http://worldmaker.net

--

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