Skip to main content

StaticFilesHandler

WSGI middleware that intercepts calls to the static files directory, as defined by the STATIC_URL setting, and serves those files.

Attributes

AttributeTypeDescription
applicationWSGI applicationThe underlying WSGI application to which requests are delegated if they do not match the static files path.
base_urlParseResultThe parsed URL structure representing the base path where static files are served, used to determine if an incoming request should be intercepted.

Constructor

Signature

def StaticFilesHandler(
application: WSGI application
) - > null

Parameters

NameTypeDescription
applicationWSGI applicationThe WSGI application object to be wrapped by this middleware.

Signature

def StaticFilesHandler(
application: WSGIApplication
) - > null

Parameters

NameTypeDescription
applicationWSGIApplicationThe underlying WSGI application to which non-static requests are delegated