Adapt an existing database to a django app
问题 I have a Postgresql databese with data. I want to create a django app with that database. How can i import the tables to django models and/or views? 回答1: There is a utility called manage.py inspectdb to generate models from your existing database. It works pretty well. $ python manage.py inspectdb > models.py 回答2: If your database is not very simple -- or very well designed -- you'll find it a poor fit with Django. While the reverse engineering works well, you may find that the original