use python instead on django shell

If you’re looking to run Python scripts in the “Django Context” (accessing models, etc), I suggest you take a look at the Writing custom django-admin commands docs. If you’re just looking to preload data into tables, take a look at the docs for Providing initial data for models.

1 Like