if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL, document_root=settings.
        STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
How to upload image file from django admin panel ?