Tom, On Wed, 2006-06-28 at 03:09 -0700, tomass wrote: > Hi Folks, > > I've just tried to add a time field to one of my models, and then I > ran: > > ALTER TABLE blah ADD COLUMN blah_blah TIME; > UPDATE blah SET blah_blah='09:00:00' > > I restarted apache, and I can see my current entries are showing 9am > correctly in the new "blah_blah" field, but when I try to add a new > entry into the "blah" table I get the following error: > > AttributeError at /admin/runsheets/item/add/ > 'str' object has no attribute 'strftime' > Request Method: GET > Request URL: http://example.com/admin/runsheets/item/add/ > Exception Type: AttributeError > Exception Value: 'str' object has no attribute 'strftime' > Exception Location: > > /usr/lib/python2.4/site-packages/Django-0.91-py2.4.egg/django/db/models/fields/__init__.py > in flatten_data, line 750 > > Any ideas what's happening here?
I'm so sorry.... I misread where this was occurring in my earlier response (and that you were using a TimeField and not a DateField). It is not related at all to the tickets I pointed out. And I'm a bit unsure what is happening here. Could you post the full traceback that appears when you have the problem (there is a little link lower down the screen that says "cut and paste version"... click on that to get something that is suitable for email). Also, what doe the model field say? In particular, I am interested in what attributes you may have set in the TimeField(...) call. Again, sorry for not paying attention earlier. I was on autopilot a bit too much. If you can give a bit more information, we should be able to work this out. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" 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-developers -~----------~----~----~----~------~----~------~--~---
