seems like a very simple example based on http://www.djangoproject.com/documentation/0.96/serialization/:
def exportCountryCodeFixture(): from django.core import serializers from mysite.models import CountryCode out = open("CountryCode.xml", "w") serializers.serialize("xml", CountryCode.objects.all(), stream=out causes this error: Traceback (most recent call last): File "<console>", line 1, in <module> File "c:\Documents and Settings\administrator\My Documents\workspace \Orb\src\mysite\tests\models.py", line 14 , in exportCountryCodeFixture serializers.serialize("xml", CountryCode.objects.all(), stream=out) File "c:\Python25\Lib\site-packages\django\core\serializers \__init__.py", line 67, in serialize s.serialize(queryset, **options) File "c:\Python25\Lib\site-packages\django\core\serializers \base.py", line 50, in serialize return self.getvalue() File "c:\Python25\Lib\site-packages\django\core\serializers \base.py", line 110, in getvalue return self.stream.getvalue() AttributeError: 'file' object has no attribute 'getvalue' --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---