How to drop all tables from the database with manage.py CLI in Django?

前端 未结 18 1670
余生分开走
余生分开走 2020-11-29 16:54

How can I drop all tables from a database using manage.py and command line? Is there any way to do that executing manage.py with appropriate parameters so I can execute it f

18条回答
  •  攒了一身酷
    2020-11-29 17:38

    I would recommend you to install django-extensions and use python manage.py reset_db command. It does exactly what you want.

提交回复
热议问题