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.
Try instead:
python manage.py dumpdata auth
The dumpdata
command doesn't require the (fully qualified) package name of the app, only the name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With