Django local development with uvicorn

It's possible to add ASGI support to python manage.py runserver, so the local development server, by installing daphne and adding it to INSTALLED_APPS.

See docs here. This is how the result looks:

System check identified no issues (0 silenced).
December 02, 2024 - 20:50:29
Django version 5.0, using settings 'contractscounsel.settings'
Starting ASGI/Daphne version 4.1.2 development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

Is it possible to do the same, but with uvicorn instead of daphne?

You don't have to use the runserver command do to local development. It's just a convenience management command.

The following command has the same effect:

python -m uvicorn contractscounsel.asgi:application --reload
Back to Top