Yes, it was that. Thank you very much for the help.
Dody Suria Wijaya wrote:
Your field might be a type of DateTimeField, and you passed a Date object. graham_king wrote:Dear django developers, Using the latest django from SVN with python 2.4.2 and mysql 4.1.14, when I try and save an object with a date in it I get the following error: File "test.py", line 9, in ? -- my code activity.save() -- my code File "/usr/lib64/python2.4/site-packages/django/utils/functional.py", line 3, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/usr/lib64/python2.4/site-packages/django/core/meta/__init__.py", line 1012, in method_save db_values = [f.get_db_prep_save(f.pre_save(getattr(self, f.attname), True)) for f in opts.fields if not isinstance(f, AutoField)] File "/usr/lib64/python2.4/site-packages/django/core/meta/fields.py", line 431, in get_db_prep_save value = value.replace(microsecond=0) TypeError: replace() takes no keyword arguments In django/core/meta/fields.py if I comment out these lines (430 and 431): if settings.DATABASE_ENGINE == 'mysql': value = value.replace(microsecond=0) it works fine. Am I missing something ? Thanks in advance, Graham King.
