On Mon, Sep 15, 2008 at 10:27 AM, sotirac <[EMAIL PROTECTED]> wrote: > > I'm trying to initialize my database using yaml fixtures. > I've created a yaml fixtures directory (src/fixtures). Within the > yaml fixtures directory, I created a yaml fixtures file title > websites.yaml. ... > Now when I try to invoke the command "python > manage.py loaddata fixtures/websites" inside my src directory, it > gives me no error message but nothing is added into my sqlite > database.
You say you didn't get an error message, but did you get a message saying "X objects loaded from Y fixtures"? If you didn't see this message, then the fixtures have not been loaded. The next thing to check is where you have put the fixtures. You say you put the fixtures in a src/fixtures directory - did you add this directory in the FIXTURE_DIRS setting? By default, Django will only look for a fixtures directory in each installed applicaiton (e.g., if you have polls/models.py, Django will look in polls/fixtures/* for fixtures). If you want to use another directory, you will need to register that directory using the FIXTURE_DIRS setting. Lastly, you only need to specify the fixture name when loading the fixture (i.e., "websites" or "websites.yaml") - you don't need to provide a full path for the fixture. Django will fill in the rest of the path name as it searches the known locations for fixtures. 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---