﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3146	'str' object has no attribute 'strftime' Error when the foreign key is a date	Ikipou@…	nobody	"When a model use a date as foreign key, the admin interface crash when creating or editing an object.
For exemple, the following model crash when creating Event in the admin interface:
{{{
class Day(models.Model):
    date = models.DateField(primary_key=True, db_column='Date')

    class Admin:
        pass

class Event(models.Model):
    id_event = models.AutoField(primary_key=True, db_column='idEvent')
    date = models.ForeignKey(JourneeElectorale, db_column='Date')

    class Admin:
        pass
}}}

Complete error is :
Exception Type:  	AttributeError
Exception Value: 	'str' object has no attribute 'strftime'
Exception Location: 	/usr/lib/python2.4/site-packages/django/db/models/fields/__init__.py in get_db_prep_save, line 467"	defect	closed	contrib.admin	dev	normal	fixed	date foreign key		Ready for checkin	1	0	0	0	0	0
