Re: python.py deserialization and handling foreign key fields ?

2007-07-13 Thread Etienne Robillard
Hi Russell, Thanks for responding to this thread. You were right for the data not matching the model. The assumption that some_model_instance.__dict__.keys() would return the fields names is simply wrong. :) Yes im trying to get a csv deserializer using the python.py and csv.py modules as a

Re: python.py deserialization and handling foreign key fields ?

2007-07-12 Thread Russell Keith-Magee
On 7/13/07, Etienne Robillard <[EMAIL PROTECTED]> wrote: > Any pointers how to work-around this issue ? On a side note - this message should have been sent to Django-users, not django-developers. Django-developers is for discussing the development of Django itself, not for general user queries.

Re: python.py deserialization and handling foreign key fields ?

2007-07-12 Thread Russell Keith-Magee
On 7/13/07, Etienne Robillard <[EMAIL PROTECTED]> wrote: > > How should exceptions caught by FieldDoesNotExist be handled > when trying to deserialize a object mapping to native python data types? ... > Any pointers how to work-around this issue ? I'm unclear what the issue is. Are you building

python.py deserialization and handling foreign key fields ?

2007-07-12 Thread Etienne Robillard
Hi all, How should exceptions caught by FieldDoesNotExist be handled when trying to deserialize a object mapping to native python data types? For example, I have a csv row which I would like to deserialize into a model instance, but it breaks when trying to convert any foreign key field,