This is a pre-release. djust 0.3.5 has shipped since: read the djust 0.3.5 release notes.
Added
- Type stubs for Rust-injected LiveView methods —
.pyistubs forlive_redirect,live_patch,push_event,stream, and related methods so mypy/pyright catch typos at lint time. (#390) Seedocs/website/guides/typecheck.md. - Navigation Patterns guide — Documents when to use
dj-navigatevslive_redirectvslive_patch. (#390) - Testing guide — Django testing best practices and pytest setup for djust applications. (#390) See
docs/website/api-reference/testing.md. - System checks reference — New
docs/system-checks.mdcovering all 37 check IDs (C/V/S/T/Q) with severity, detection method, suppression patterns, and known false positives. (#398)
Security
mark_safe(f"...")eliminated in core framework —components/base.pynow usesformat_html()to avoid XSS risk in component rendering. (#390)- Exception details no longer exposed in production —
render_template()previously returnedf"<div>Error: {e}</div>"unconditionally, leaking internal Rust template engine details. Now returns a generic message in production; error details are only shown whensettings.DEBUG = True. (#385) - Playground XSS fixed — Replaced
innerHTMLassignment with a sandboxed iframe for user-editable preview content. (#384) - Prototype pollution guard — Added safeguards against prototype pollution in client-side JS. (#384)
Fixed
{% if %}inside attribute values no longer shifts VDOM path indices — Conditional attribute fragments were causing off-by-one errors in VDOM diffing. (#390)super().__init__()added to component and backend subclasses —TenantAwareRedisBackend,TenantAwareMemoryBackend, and several example components were missingsuper().__init__()calls, causing MRO issues. (#386)- Unused
escapeimport removed fromdata_table.py— CodeQL alert resolved. (#387) render_full_templatesignature mismatch fixed —no_template_demo.pyoverride now correctly acceptsserialized_context. (#387)- V004 false positives on lifecycle methods —
handle_params(),handle_disconnect(),handle_connect(), andhandle_event()no longer incorrectly trigger the V004 system check. (#398) - T013 false positives for
{{ view_path }}—dj-view="{{ view_path }}"(Django template variable injection) is now correctly recognised as valid by T013. (#398) - V008 false positives for
-> str-annotated functions — Functions with primitive return-type annotations (e.g.-> str,-> int) no longer trigger V008 when their result is assigned inmount(). (#398) - Test isolation —
test_checks.pyanddouble_bind.test.jsno longer fail when run as part of the full suite. (#390)