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.2 Django 4.2 Django 3.2 ASGI WSGI

Django/Python Consulting

If you have a specific Django challenge or integration you'd like to solve, I'd be happy to help. Book a free 30-minute call to discuss your project, see if we're a good fit, and explore the best approach for your needs. After the call, you'll receive a tailored cost estimate based on what we discuss.