Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I have set up a Django website with Github following the tutorial. I have also set up an associated job, which runs a python script before every deploy. The python script fails with the following error:
elif len(sys.argv) > 0 and sys.argv[1] != 'collectstatic':
IndexError: list index out of range
I assume this is because my python script calls django.setup(), which then triggers the code above from the settings.py file. As there are no other argv in the run command the index 1 results in out of range (i.e. the run script is simply: python script.py, so no arguments)
How do I fix this? And in general, what’s the best way to run a python script that connects to my Django website?
Matteo Scarpa
Matteo Scarpa
KFSys
4ae272398ee6445a9bf73f4cd632b5
KFSys
phosphide
KFSys
KFSys
garantieheld
KFSys