DEV Community 👩‍💻👨‍💻

Victor Ribeiro
Victor Ribeiro

Posted on

Split your Django generated models into separated files

Split Django Models

Split Django generated models into separated files, with proper names, classes and imports.


Generate your models:

python3 inspectdb >

Run the script:


Put them all into a folder so you can enjoy the step bellow:

The script also creates a file, so you can import them all at once:

from yourapp.models import *

Get the script here

Top comments (0)

An Animated Guide to Node.js Event Lop

>> Check out this classic DEV post <<