reverse engineer mysql database to create django app

前端 未结 1 1765
萌比男神i
萌比男神i 2020-12-08 03:12

I basically want to take an existing mysql database structure created and used by a php app (codeigniter framework) and reverse engineer it to a django app. is there some t

相关标签:
1条回答
  • 2020-12-08 03:44

    Create a project, and point your settings @ your database

    Then run

    ./manage.py inspectdb

    This will print out a python models file for the DB you're pointing at

    You can output this to a file by doing something like

    ./manage.py inspectdb > models.py

    And then you can move the file to the most suitable location, and edit it as needed.

    0 讨论(0)
提交回复
热议问题