Hi Tim, > lEvent = Event(request.POST)
Are you sure it's not that line causing trouble ? -- David On 21-Feb-08, at 5:16 PM, Tim Sawyer wrote:
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 ExceptionLocation: /usr/lib/python2.5/site-packages/django/db/backends/ util.py inexecute, 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? Isuspect 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 -~----------~----~----~----~------~----~------~--~---
smime.p7s
Description: S/MIME cryptographic signature

