Release Notes — v0.3.1 (November 5, 2026)
Patch release. No API, data model, migration or configuration changes.
This release fixes invalid TomSelect asset markup that appeared above the toolbar on Django 6.1.
Fix: stray " rel="stylesheet" media="all"> above the toolbar
enezaframework/templates/components/layouts/default.html used django-tomselect's {% tomselect_media %} tag. On Django 6.1, widget.media._css contains Stylesheet objects rather than path strings. django-tomselect's to_static_url() calls startswith() on those objects, fails, and returns the object as a fallback. The object's string form is a complete <link ... media="all" rel="stylesheet"> tag, which was then embedded inside another <link href="...">.
The browser closed the outer tag early and rendered the leftover " rel="stylesheet" media="all"> as text above the toolbar.
The layout now uses a framework-local {% ez_tomselect_media %} tag (enezaframework/templatetags/tomselect_media.py) that renders the widget through Django's supported Media.render() API. Django renders each Stylesheet and Script once, so the output contains only valid, non-nested asset tags. The tag still honours django-tomselect's configured CSS framework and DEBUG-driven minified/non-minified asset selection.
Files changed
| File | Change |
|---|---|
enezaframework/templatetags/tomselect_media.py |
New ez_tomselect_media template tag using TomSelectIterablesWidget().media.render(). |
enezaframework/templates/components/layouts/default.html |
Loads tomselect_media and calls {% ez_tomselect_media %}. |
Upgrading
Install enezaframework==0.3.1. No migrations or data changes are required.
Dependency pins are unchanged: Django 6.1.2 and django-tomselect 2025.9.1. Upgrading django-tomselect alone does not fix the issue; the latest release still reads widget.media._css as path strings.
Packaging
- Version bumped to
0.3.1insetup.py,eneza/__init__.pyandeneza/templates/project/requirements.txt. - Generated projects now require
enezaframework==0.3.1.
Validation
Per project rules, the developer or agent does not run or claim test results. The user is solely responsible for all testing and validation. Suggested checks: load the dashboard, confirm the <head> contains one valid tag per TomSelect asset with no nested <link> elements, confirm the stray text is gone, and verify TomSelect-enabled fields still initialise.