How to execute a Python script from the Django shell? - Stack Overflow

PHOTO EMBED

Sat Feb 04 2023 00:14:05 GMT+0000 (Coordinated Universal Time)

Saved by @dap465 #python

>>> exec(open('myscript.py').read())
content_copyCOPY

https://stackoverflow.com/questions/16853649/how-to-execute-a-python-script-from-the-django-shell