9 Feb 2009 henrique   » (Observer)

Django's dumpdata

I feel like an idiot every time I need to use dumpdata on my django projects. First, it is very sad to have to run the following set of commands when I change some column definitions on my models:

$ python manage dumpdata > foo-dump.json
$ python manage reset app
$ python manage loaddata foo-dump

Second, it drive me nuts after I note that the loaddata command doesn't work like I was expecting, that is "restore my data in this new schema configuration". For some reason, the loaddata doesn't load my app's data, but only the data of "built-in" django applications (like auth and admin, for example). The result you can deduce: the impression is that I lost all my data (luckly, demonstration data) and I'm too bored to check if it is really the truth.

Tomorrow I'll check it with more attention and, very likely, I'll be reporting a ticket at django's trac.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!