Django dumpdata django.contrib.auth

11,967

Solution was much more easy than a thought. Just run

python manage.py dumpdata auth
Share:
11,967

Related videos on Youtube

imkost
Author by

imkost

Updated on September 16, 2022

Comments

  • imkost
    imkost over 1 year

    I want dump data of django.contrib.auth app.

    I've tried:

    >> python manage.py dumpdata django.contrib.auth > 'django.contrib.admin.json'
    Error: Unknown application: django.contrib.auth
    >> python manage.py dumpdata 'django.contrib.auth' > 'django.contrib.admin.json'
    Error: Unknown application: django.contrib.auth
    

    Nothing works. Need your help.

    • singer
      singer about 11 years
      Other management commands are working?
    • imkost
      imkost about 11 years
      @singer, yes, python manage.py dumpdata myapp > 'myapp.json works fine
    • singer
      singer about 11 years
      Are you using virtualenv? django.contrib.auth is in INSTALLED_APPS, sorry for obvious question just to check.
    • singer
      singer about 11 years
      What OS are you using?
    • imkost
      imkost about 11 years
      @singer, yes, django.contrib.auth is in INSTALLED_APPS. OS is Ubuntu
    • imkost
      imkost about 11 years
      About virtualenv. I don't know for sure, but I guess I use it. I can use apps from my python dir
  • imkost
    imkost about 11 years
    Ha-ha) so simple. Thank you very much!
  • neosergio
    neosergio over 7 years
    If you want just user, you can run: python manage.py dumpdata auth.user