I have a simple project using the flatpages app.  If I use
manage.py to run dumpdata (with no command line arguments,
redirecting output to a file), then flush, then loaddata (with no
command line arguments, redirecting input from a file), my sqlite3
database file is different than a backup copy I made of it, and
when I run the app, it seems to be reset to an empty-database
condition.  Why is this?

The dump file appears to contain the content of my database.

The Django docs [1] say:

    dumpdata

    django-admin.py dumpdata <appname appname ...>

    Outputs to standard output all data in the database associated
    with the named application(s).

    If no application name is provided, all installed applications
    will be dumped.

    The output of dumpdata can be used as input for loaddata.

[1]: <http://docs.djangoproject.com/en/1.0/ref/django-admin/>

In the root directory of my project, I'm running:

    ./manage.py dumpdata >data.json
    ./manage.py flush
    # (answer yes to flush, no to create superuser)
    ./manage.py loaddata <data.json

I'm using:

  * Ubuntu GNU/Linux 8.10
  * Django 1.0-final-SVN-unknown (from the 1.0.1ubuntu1 package)
  * Python 2.5.2
  * sqlite 3.5.9

-- 
Phil Mocek

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to