views:

58

answers:

1

I use dumpdata to output all my apps's classes. One of my app has one class that never get's outputted and I don't know where to start looking to know what's wrong. The class is used regularly, every other classes in the app are dumped fine and dumpdata doesn't throw any error.

Any cue ?

A: 

You might try serializing it to json and see if you get any errors there -- maybe there's a subtle inconsistency that's messing up the serialization.

>>> from django.core import serializers
>>> from myapp.mymodels import mymodel
>>> serializers.serialize('json', mymodel.objects.all())
[...]

This might be worth a try too:

>>> serializers.serialize('python', mymodel.objects.all())
[...]
Seth
will try that thanks.
PhilGo20