# Suggested Commands ## Development ```bash python manage.py runserver 0.0.0.0:8000 # dev server python manage.py check --deploy # check config python manage.py test api # run tests ``` ## uWSGI ```bash uwsgi --ini uwsgi.ini # start uwsgi --reload uwsgi.pid # hot reload uwsgi --stop uwsgi.pid # stop # On server: /opt/miniconda/envs/django/bin/uwsgi --ini /home/simon/myquant/djapi/uwsgi.ini kill $(lsof -ti:5004) # force stop ``` ## Deploy ```bash # Full sync (exclude production data) rsync -avz --delete \ --exclude='.env' --exclude='db.sqlite3' \ --exclude='*.log' --exclude='uwsgi.pid' \ --exclude='__pycache__/' --exclude='*.pyc' \ --exclude='xwlb_video/' --exclude='audio_processing/' \ /Users/summer/Downloads/cc-cursor/djapi/ \ simon@doorcome.cn:/home/simon/myquant/djapi/ # Single file sync MUST use full target path rsync -avz api/views.py simon@doorcome.cn:/home/simon/myquant/djapi/api/views.py ``` ## API Docs - /api/docs/ — Swagger UI - /api/redoc/ — ReDoc - /api/schema/ — OpenAPI JSON ## Video Processing ```bash cd api/video python main.py ```