module documentation

Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting.
Function serve Serve static files below a given point in the directory structure or from locations inferred from the staticfiles finders.
def serve(request, path, insecure=False, **kwargs):

Serve static files below a given point in the directory structure or from locations inferred from the staticfiles finders.

To use, put a URL pattern such as:

from django.contrib.staticfiles import views

path('<path:path>', views.serve)

in your URLconf.

It uses the django.views.static.serve() view to serve the found files.