Complete the code to import the correct Django server interface for synchronous applications.
from django.core.handlers.[1] import WSGIHandler
The WSGIHandler is imported from django.core.handlers.wsgi for synchronous Django apps.
Complete the code to import the correct Django server interface for asynchronous applications.
from django.core.handlers.[1] import ASGIHandler
The ASGIHandler is imported from django.core.handlers.asgi for asynchronous Django apps.
Fix the error in the code to correctly create an ASGI application callable.
application = [1]()For an ASGI app, the callable must be an instance of ASGIHandler.
Fill both blanks to complete the ASGI application setup with Django's async interface.
import django django.setup() application = [1]() # Create the [2] callable
ASGIHandler creates the asynchronous callable needed for async Django apps.
Fill all three blanks to create a dictionary mapping server interfaces to their Django handlers.
handlers = {
'wsgi': [1],
'asgi': [2],
'default': [3]
}The dictionary maps 'wsgi' to a WSGIHandler instance, 'asgi' to an ASGIHandler instance, and 'default' to None when no handler is set.