On Mon, Nov 10, 2008 at 6:30 PM, Adda Badda <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> Im having a problem loading initial data into my app with yaml. I have
> installed yaml for python using macports and placed the package in my
> site-packages directory. From the shell the yaml package loads when I
> type "import yaml" but django still tells me: "yml is not a known
> serialization" when I try and load data.
yml isn't a known serialization format, but yaml is. Django uses file
extensions to identify file types; you need to name your fixtures
my_fixture.yaml, not my_fixture.yml.
If you specifically want to use yml as an extension for fixtures, you
will need to register the YAML serializer with that extension. This
can be done by putting the following into your settings.py file:
SERIALIZATION_MODULES = {
'yml': "django.core.serializers.pyyaml"
}
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
-~----------~----~----~----~------~----~------~--~---