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 clue ?
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())
[...]
精彩评论