About ASGI and WSGI Compatibility

Django ASGI (Asynchronous Server Gateway Interface) supports asynchronous and normal (synchronous) views. WSGI (Web Server Gateway Interface) supports both too, just doesn't allow to take them as long.

Django is smart enough to convert the synchronous views to asynchronous for ASGI and asynchronous views to synchronous for WSGI. However, that might take milliseconds longer than using the right view for the right interface directly.

Tips and Tricks Programming Development Django 5.x Django 4.2 Django 3.2 ASGI WSGI