[Django]-Import MySQL tables into Django

4👍

You can use your existing schema to create tables. The official documentation is at: https://docs.djangoproject.com/en/1.7/howto/legacy-databases/

There are two commands:

python manage.py inspectdb

This will give you the output of running:

python manage.py inspectdb > models.py

Django won’t know how you want to break these models up into separate application modules, so you’ll need to do that on your own, if necessary.

Leave a comment