Django Template Tag for Dashboard Vite Build Assets

Django template tags for the Dashboard app.

smarter.apps.dashboard.templatetags.react_dashboard.dashboard_react_assets()[source]

Load CSS and JS files for a React app entry point based on its manifest.json.

Return type:

AssetDict

smarter.apps.dashboard.templatetags.react_dashboard.templatetag_manager = <smarter.lib.django.templatetags.smarter_react_templatetag_manager.SmarterReactTemplateTagManager object>

Manages integration of Vite-built React assets into Django templates. Expects to find a Vite-generated manifest.json in the file path static/react/@smarter/dashboard/.

Example manifest.json structure:

{
    "index.html": {
        "file": "assets/index-D6-GPOR-.js",
        "name": "index",
        "src": "index.html",
        "isEntry": true,
        "css": [
        "assets/index-B011HLqe.css"
        ]
    }
}