Complete the code to import the function needed to serve media files in development.
from django.conf.urls.static import [1]
The static function is imported from django.conf.urls.static to help serve media files during development.
Complete the code to add media URL patterns in development using the imported function.
urlpatterns += [1](settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)The static function is used to append URL patterns that serve media files during development.
Fix the error in the condition to serve media files only in development mode.
if settings.DEBUG [1] True:
Using == is the correct way to compare with True in Python for equality check. Using is is not recommended for boolean comparisons.
Fill both blanks to complete the import and settings references for serving media files.
from django.conf import [1] urlpatterns += static(settings.[2], document_root=settings.MEDIA_ROOT)
You import settings from django.conf to access MEDIA_URL for media serving.
Fill all three blanks to complete the typical pattern for serving media files in development.
if settings.DEBUG: urlpatterns += [1](settings.[2], document_root=settings.[3])
In development, static is used with MEDIA_URL and MEDIA_ROOT to serve media files.