{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/3"},{"label":"Application Frameworks","url":"https://skillfed.io/packages/category/software-development-libraries-application-frameworks"},{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content"}],"enrichment":{"capability":"Adds script, stylesheet, and JSON tags with custom attributes to Django's forms.Media, enabling CSP-compatible data injection and import map support.","skillfed_tags":["django-forms","csp-nonce","es-modules"],"use_cases":["Inject CSP nonces into script tags for security-conscious applications without manual template manipulation.","Add data attributes to scripts for passing configuration from Django templates to JavaScript without global variables.","Render import maps alongside module scripts, letting the browser resolve short module names to hashed static file URLs.","Combine media from multiple forms and widgets while automatically deduplicating identical assets across Django versions.","Render inline CSS and JSON blobs alongside external stylesheets and scripts in a single Media object.","Migrate from older Django versions to 5.2 while maintaining a consistent asset API across the codebase."],"what_it_does":"django-js-asset extends Django's forms.Media to render script, stylesheet, and JSON tags with arbitrary HTML attributes\u2014particularly useful for Content Security Policy nonces, module types, and data attributes. It provides JS, CSS, and JSON classes that produce Django's native Script and Stylesheet objects (backported on older Django versions), ensuring proper deduplication when multiple forms and widgets contribute media to a single page. The package also handles import maps, merging them into a single script tag rendered before all other scripts so that modules can rely on them without rewriting imports.\n\nThe library is designed for Django developers who need fine-grained control over script and stylesheet rendering\u2014especially in admin customizations, complex forms, and applications requiring CSP compliance. It bridges the gap between older Django versions and Django 5.2's native Script object support, offering a consistent API across versions. A static helper function abstracts version differences in Django's static file handling, and the Media class can merge import maps and combine assets from multiple sources (views, forms, widgets) into a single deduplicated output.","worth_installing":"Yes. The package is actively maintained, has no known vulnerabilities, and solves a real problem for Django developers who need custom script attributes or import map support. It's especially valuable if you're using CSP nonces, passing data to scripts via attributes, or managing complex form media across multiple Django versions. The low install friction and permissive license make adoption straightforward."},"id":"django-js-asset","links":{"html":"https://skillfed.io/packages/django-js-asset","md":"https://skillfed.io/packages/django-js-asset.md","pypi":"https://pypi.org/project/django-js-asset/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-06-11","license_spdx":null,"license_treatment":"permissive","name":"django-js-asset","python_support":"supports_current","summary":"script tag with additional attributes for django.forms.Media"},"popularity":{"monthly_downloads":3475121,"position":2611,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"4.0.1"}
