On Wed, Dec 24, 2008 at 6:33 AM, [email protected] <[email protected]> wrote: > > looking at the serialization serializers, is is possible to save "new" > instance of a model object represented in xml? > > i'm getting an error: > > <object> node is missing the 'pk' attribute, but basically, there > isn't one, because i don't want the object retrieved from the db, i > want to instantiate it from the xml, then save it? > > possible?
It isn't possible right now. However, fixing this by inserting some error handling for the 'object doesn't have pk' case should be relatively simple to implement. Feel free to open a ticket suggesting this. If you're feeling adventurous, it should be a relatively simple problem to fix yourself. The serializers are mostly self-contained, so if you're looking for a simple way to get involved with Django development, this would be a good candidate. Work out the changes required, write a test case for the test suite, and you could have your problem solved and your name in the credits. If you do decide to have a try at solving this problem, keep in mind that there is a second side to the problem - once you can serialize an object without a primary key, you also need to be able to deserialize an object that has been serialized without a primary key. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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-users?hl=en -~----------~----~----~----~------~----~------~--~---

