3👍
✅
Unfortunately that doesn’t exist any more, however the command manage.py dbshell
does.
Generally speaking however, you should try to use models, with load_data etc to preserve the data integrity (as validations etc may happen in models rather then relying on underlying data bits). Or write management commands for any clean up tasks.
0👍
Yes it is possible, using the inspectdb command:
python manage.py inspectdb
or
python manage.py inspectdb > models.py
to get them in into the file
This will look at the database configured in your settings.py
and outputs model classes to standard output.
As Ignacio pointed out, there is a guide for your situation in the documentation.
Source : link
Source:stackexchange.com