6

Is there a handy way to translate a MySQL schema to a Django model?

1

1 Answer 1

12

this command will do exactly what it says on the tin

python manage.py inspectdb
Sign up to request clarification or add additional context in comments.

2 Comments

Perfect! How did I ever not see this before? Thanks!
Wow! I somehow cleverly assumed this just dumped the defined models for a Django instance. Now, if it was called introspectdb? RTFCH, noted :D!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.