I'm not sure I understand what I'm doing here.  I'm trying to create an Event 
object from the data in a form (a simple html form, not a django form).

I want to do this:

    lDay = int(request.POST['DayNo'])
    lMonth = int(request.POST['MonthNo'])
    lYear = int(request.POST['YearNo'])
    lEvent = Event(request.POST)
    if lEvent.id == 0:
        lEvent.id = None
    lEvent.date = datetime(lYear,lMonth,lDay)
    lEvent.save()

and I'm getting the error

Exception Type:         ProgrammingError
Exception Value:        can't adapt
Exception 
Location:       /usr/lib/python2.5/site-packages/django/db/backends/util.py in 
execute, line 12

where the last bit of my code it hit was the save method.

Have I obviously done something wrong or is the problem data related?  I 
suspect it's caused by the date assignment?  Any thoughts/pointers 
appreciated.

Thanks,

Tim.

--~--~---------~--~----~------------~-------~--~----~
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