I get : No fixtures found when I do python manage.py loaddata bob
pubu...@pubuntu:~/django-trunk/django/bin/mysite$ cat bob
[
{
"model": "myapp.person",
"pk" : 1,
"fields": {
"first_name": "John",
"last_name": "Lenon",
}
]
I copied my bob file into the fixtures directory.
pubu...@pubuntu:~/django-trunk/django/bin/mysite$ python manage.py
loaddata bob
Loading 'bob' fixtures...
No fixtures found.
pubu...@pubuntu:~/django-trunk/django/bin/mysite$
On Apr 20, 3:28 pm, Daniel Roseman <[email protected]>
wrote:
> On Apr 20, 8:16 pm, bconnors <[email protected]> wrote:
>
>
>
>
>
> > How do I set up a initial_data.json file?
> > Athttp://docs.djangoproject.com/en/dev/howto/initial-data/
>
> > I came across this “Or, you can write fixtures by hand; fixtures can
> > be written as XML, YAML, or JSON documents. The serialization
> > documentation has more details about each of these supported
> > serialization formats.
> > As an example, though, here’s what a fixture for a simple Person model
> > might
> > look like in JSON:
> > [
> > {
> > "model": "myapp.person",
> > "pk": 1,
> > "fields": {
> > "first_name": "John",
> > "last_name": "Lennon"
> > }
> > },
> > {
> > "model": "myapp.person",
> > "pk": 2,
> > "fields": {
> > "first_name": "Paul",
> > "last_name": "McCartney"
> > }
> > }
> > ]
>
> So, what's the problem? The instructions seem clear enough. Where are
> you having trouble?
> --
> DR.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---