#3146: 'str' object has no attribute 'strftime' Error when the foreign key is a
date
--------------------------------+-------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: nobody
Status: new | Component: Admin interface
Version: SVN | Resolution:
Keywords: date foreign key | Stage: Accepted
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
--------------------------------+-------------------------------------------
Comment (by Ikipou):
The Traceback with the last SVN version and Python 2.5:
Traceback (most recent call last):
File "/usr/local/lib/python2.5/site-packages/django/core/handlers/base.py"
in get_response
77. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.5/site-
packages/django/contrib/admin/views/decorators.py" in _checklogin
55. return view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.5/site-
packages/django/views/decorators/cache.py" in _wrapped_view_func
39. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.5/site-
packages/django/contrib/admin/views/main.py" in add_stage
261. new_object = manipulator.save(new_data)
File "/usr/local/lib/python2.5/site-
packages/django/db/models/manipulators.py" in save
110. new_object.save()
File "/usr/local/lib/python2.5/site-packages/django/db/models/base.py" in
save
232. db_values = [f.get_db_prep_save(raw and getattr(self, f.attname) or
f.pre_save(self, True)) for f in self._meta.fields if not isinstance(f,
AutoField)]
File "/usr/local/lib/python2.5/site-
packages/django/db/models/fields/related.py" in get_db_prep_save
529. return self.rel.get_related_field().get_db_prep_save(value)
File "/usr/local/lib/python2.5/site-
packages/django/db/models/fields/__init__.py" in get_db_prep_save
538. value = value.strftime('%Y-%m-%d')
AttributeError at /admin/foreigndate/event/add/
'unicode' object has no attribute 'strftime'
--
Ticket URL: <http://code.djangoproject.com/ticket/3146#comment:3>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---