GeoDjango Management Commands — Django documentation
From Get docs
Django/docs/3.0.x/ref/contrib/gis/commands
GeoDjango Management Commands
inspectdb
- django-admin inspectdb
When django.contrib.gis is in your :setting:`INSTALLED_APPS`, the :djadmin:`inspectdb` management command is overridden with one from GeoDjango. The overridden command is spatially-aware, and places geometry fields in the auto-generated model definition, where appropriate.
ogrinspect
The ogrinspect
management command will inspect the given OGR-compatible DataSource (e.g., a shapefile) and will output a GeoDjango model with the given model name. There’s a detailed example of using ogrinspect
in the tutorial.