switching an app to run on uvicorn instead of runserver

I have an existing django 4.2.16 application built-in house.
I came across uv, so tried this on my development laptop.

python -m pip install uvicorn
python -m uvicorn cayank.asgi:application
INFO:     Started server process [19092]
INFO:     Waiting for application startup.
INFO:     ASGI 'lifespan' protocol appears unsupported.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)

But on going to localhost:8000, I get :

SynchronousOnlyOperation at /
You cannot call this from an async context - use a thread or sync_to_async.

So we can’t just switch to uv just like that on an existing django app ?

Correct, because your views are defined as synchronous functions.

See Asynchronous support | Django documentation | Django