Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running manage.py dumpdata on apps with dots in their names

I'm trying to do moving some data from my development machine to a server using dumpdata but ran into a problem. So, say I want to dump the data that belongs to the app django.contrib.auth.
django.contrib.auth is in my INSTALLED_APPS.
This happens when I run
$ python manage.py dumpdata django.contrib.auth

Error: Unknown application: django.contrib.auth

The strange thing is that I can do manage.py testserver (i.e. nothing is broken) or do
$ python
>>> import django.contrib.auth

So there is nothing wrong with the python path.
I can run dumpdata on apps that are located straight in my project's dir.
If I leave out the apps' names, django.contrib.auth's tables are dumped as expected.

So, why can't I point out a specific app with dots in the name? I have tried to dump other apps that are located in site-packages with the same result.

like image 552
Kalle Avatar asked Sep 08 '10 12:09

Kalle


1 Answers

Try instead:

python manage.py dumpdata auth

The dumpdata command doesn't require the (fully qualified) package name of the app, only the name.

like image 161
Manoj Govindan Avatar answered Oct 10 '22 10:10

Manoj Govindan