On Sat, Mar 7, 2009 at 6:30 AM, Serdar T. <zstumgo...@gmail.com> wrote:
>
> Hey everyone,
>
> While trying to load a json fixture, the contents are spitting out to
> my bash shell but nothing is loading into the postgres database
> backend.
>
> From inside my project directory, I'm executing the documented
> command:
>
> ./manage.py loaddata data2.json
>
> In addition to the contents, the only message I get from Django is:
>
> "Installing json fixture 'data2' from absolute path."

This gives the first hint as to what might be going on - where is the
data2 fixture located? It's possible that the fixture that you think
is being loaded isn't actually the one that is being loaded. The
'absolute path' message suggests that there is a data2 fixture in your
project directory (i.e., the directory where manage.py is located). If
budtype.json is actually .../app/fixtures/budtype.json, the actual
error here could be that you have a stray data2 fixture that is being
picked up by Django's fixture discovery procedure. You may well have a
valid .../app/fixtures/data2.json, which is getting loaded
successfully, but the version in your project directory is corrupted
or invalid in some way, and is causing an error.

> Below are two slices from the fixture that works (budtype.json) and
> the one that chokes (data2.json). Would love to hear if anyone has any
> suggestions.

I'm not sure why you feel these these two particular snippets are
helpful - I can't see any difference, so the snippets are unlikely to
be the cause of the problem. If the path issue I mentioned previously
isn't the problem, the next step is to try and reduce your application
to the simplest possible situation that will fail - that is, start
deleting data, models, and fields until things start working; the last
thing you delete will be the source of the problem.

Sometimes, this process will reveal the blindingly obvious problem
between the keyboard and chair :-) However, if it doesn't, the first
step in providing a way for us to help you is to provide the simplest
possible example that fails. Once we have a trivial example that we
know fails, we can help point out the problem (either in your code or
in Django).

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 django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to