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
This answer is for postgresql DB:
Run: echo 'drop owned by some_user' | ./manage.py dbshell
NOTE: some_user is the name of the user you use to access the database, see settings.py file:
default_database = {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'somedbname',
'USER': 'some_user',
'PASSWORD': 'somepass',
'HOST': 'postgresql',
'PORT': '',
}