middleware ¤
ComponentDependencyMiddleware ¤
ComponentDependencyMiddleware(get_response: Callable[[HttpRequest], HttpResponse])
Middleware that inserts CSS/JS dependencies for all rendered components at points marked with template tags.
Source code in src/django_components/middleware.py
DependencyReplacer ¤
Replacer for use in re.sub that replaces the first placeholder CSS and JS tags it encounters and removes any subsequent ones.
Source code in src/django_components/middleware.py
join_media ¤
Return combined media object for iterable of components.