# activate your python virtual environment
pip install -r requirements.txt
python manage.py migrate
python manage.py runservermodal serve config/modal_wsgi.py# activate your python virtual environment
# create environment variables
# you only have to create secrets once per project
# get a db url before this step. i like elephantsql.com for free hobby dbs
modal secret create demo-secrets DATABASE_URL=<database url> SECRET_KEY=<a long random string>
# collect static files locally to be pushed
python manage.py collectstatic --no-input
# deploy web endpoint
modal deploy config/modal_wsgi.py
# deploy scheduled jobs
modal deploy config/modal_jobs.pyconfig/__init__.pyinitializes secrets, image, and mounts used for modalconfig/modal_settings.pysets remoteSECRET_KEYvariable and connects to remote postgres databaseconfig/modal_wsgi.pywsgi entry point for web endpointconfig/modal_jobs.pycalls django command to run scheduled jobs