On Wednesday 14 Sep 2005 4:25 pm, Matthew Marshall wrote:
> On Wednesday 14 September 2005 08:25 am, lawgon wrote:
> <snip>
>
> > File
> > "/usr/local/lib/python2.4/site-packages/django/core/meta/fields.py"
> >, line 320, in get_db_prep_save
> >     value = value.strftime('%Y-%m-%d')
> >
> > AttributeError: 'str' object has no attribute 'strftime'
> >
> > i realise that this has something to do with paths, but am unable
> > to figure it out. The main.py in settings has two options:
>
> No, I don't think this has anything to do with paths.  The method
> .strftime is a member of the python date and datetime objects.  So,
> it looks like django is expecting 'value' to be a datetime, but
> instead it is a string.
>
> Now, as to why it is getting a string, I have no clue.

false alarm - i tried with a model where there was exactly one filed - 
the image field and it worked. The problem obviously lies in some other 
part of the model i was using. I was misled because the imagefield was 
being stored as a blank.
>
> MWM

-- 
regards
kg

http://www.livejournal.com/users/lawgon
tally ho! http://avsap.org.in
ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!

Reply via email to