This is a pre-release. djust 1.0.0 has shipped since: read the djust 1.0.0 release notes.
Before you upgrade, read the upgrade guide.
Added
scripts/check-doc-snippets.pygained acheck_security_style()AST walker — doc examples are now linted for djust auto-reject triggers (#1509, completes part (c) of #1500). Every fenced Python code block inREADME.md/QUICKSTART.mdis now also scanned for the security/style anti-patterns the djust PR-checklist auto-rejects: aprint()call, aprint(f"...")call, an interpolatingmark_safe(f"..."), a bareexcept: pass, and f-string logging (logger.<level>(f"...")). Each is a hard failure (exit 1) — a published doc snippet should never teach a pattern the framework's own review forbids.@csrf_exemptis reported as a non-blocking WARNING (it is sometimes legitimate with a documented justification). A new<!-- doc-snippet-check: anti-pattern -->HTML-comment marker placed immediately before a fenced block opts that block out of the security/style verdict — for deliberately-wrong "don't do this" examples — while still subjecting it to the existing syntax and import checks. This completes part (c) of #1500 (doc-example security/style linting), which the original #1500 PR deferred. Covered bytests/test_check_doc_snippets.py— 28 tests.scripts/AUDIT_TEMPLATE.md— fill-in-the-blank template for newscripts/check-*.pyaudits (#1515). Codifies the canonical audit-script shape — therun()/build_arg_parser()/main()skeleton, the exit-code convention, the four wiring points (.pre-commit-config.yaml,.github/workflows/test.yml, amaketarget, andscripts/README.md), and the test conventions — so the next audit script is fill-in-the-blank rather than reverse-engineered from an existing one.scripts/README.mdnow references it. Internal contributor tooling.- ARIA for the P2/P3 component library — built-in roles, states, and accessible names for
progress,badge,tooltip, andavatar(#1513). Extends the framework-wide component ARIA work (1.0.0rc1, unit 4) to the P2/P3 component tier so these components are correct to assistive technology out of the box.progressgetsrole="progressbar"plusaria-valuenow/aria-valuemin/aria-valuemax.badgegets a visually-hidden status-text element for screen readers, with its decorative dot markedaria-hidden="true".tooltipgetsrole="tooltip"on the tip element andaria-describedbywiring it to its trigger.avatarmarks its initials-fallback path withrole="img"+ anaria-label, and marks the decorative status spanaria-hidden="true". A decorative-iconaria-hidden="true"sweep was also applied across the P2/P3 component templates.cardwas deliberately left unchanged — it is a generic container, and assigning it arolewould be over-reach. All changes are additive — no class was renamed and no existing element removed or reparented, so downstream CSS/JS selectors are unaffected (mirroring the add-only guarantee of PR #1491); the only new element isbadge's visually-hidden status<span>(a freshsr-onlyclass, not a selector target). Separately, 3 unlabeled form controls inexamples/demo_projecttemplates —Y003defects surfaced by PR #1512's dogfood pass — were given proper labels. This completes a slice of #1496's accessibility long-tail; the remainder — keyboard-interaction JS anddjust_audita11y reporting — is deferred to follow-up issues. Component-markup guarantees covered bypython/djust/components/tests/test_component_aria.py— 27 new tests.
Fixed
_create_tarballexclude-matching anchored — substring containment dropped legitimately-named files from deploy tarballs (#1505).python/djust/deploy_cli.py's_create_tarballmatched everyTARBALL_EXCLUDESentry via substring containment (pattern in name), so any file or directory whose name merely contained an exclude token was over-excluded —venvdroppedvenvironment.py,distdroppeddistance.py,mediadroppedmedia_helper.py, and similar lookalikes.TARBALL_EXCLUDESis now split into five typed groups —EXCLUDE_DIR_NAMES,EXCLUDE_DIR_SUFFIXES,EXCLUDE_FILE_SUFFIXES,EXCLUDE_FILENAMES, andEXCLUDE_FILENAME_STEMS— and the directory/file filters use anchored matching (exact basename / path-segment / suffix / stem) instead of substring containment, so only genuinely-matching artifacts are dropped. Sensitive files remain excluded with no credential-leak regression: a naive switch to exact-filename matching would have started shipping.env.production,.env.local, and SQLite sidecar files into deploy tarballs, soEXCLUDE_FILENAME_STEMSapplies afile == stem or file.startswith(stem + ".") or file.startswith(stem + "-")rule —.env,.env.production,.env.local,db.sqlite3, and its WAL/SHM sidecars (db.sqlite3-wal,db.sqlite3-shm, etc.) are all still excluded, while a lookalike like.environmentis correctly not excluded. Regression coverage in theTestCreateTarballclass (python/tests/test_deploy_cli.py) — 60 tests in the file.- 4 HTML-attribute regexes in
checks.pyre-anchored to stop false-matchingdata-*attributes (#1514)._ACCESSIBLE_NAME_ATTR_RE,_HREF_ATTR_RE,_IMG_HAS_ALT_RE, and_CONTROL_ID_REused a bare\bword-boundary anchor before the attribute name. Because-is a non-word character,\bmatches inside adata-prefix (betweendata-and the attribute name), so each regex false-matcheddata-*attributes — e.g._IMG_HAS_ALT_REtreated<img data-alt=...>as having a realalt(aY002false negative on a genuinely alt-less image), and_HREF_ATTR_REcould treat<a data-href=...>as a real link (aY001false positive). All four are now anchored with(?<![\w-]), which rejects both word characters and hyphens immediately before the attribute name. This is the same fix PR #1512 applied to theY003/Y004regexes — the third occurrence of this\b/data-*defect class. Recurrence is guarded against by a new meta-check test,TestChecksRegexHardeninginpython/djust/tests/test_accessibility_checks.py, which introspects every compiled attribute regex inchecks.pyand fails on any bare-\banchor; the four_LIVE_RENDER_*template-tag-kwarg regexes are allowlisted since they scan{% %}kwargs rather than HTML attributes (#1517). 8 new tests inpython/djust/tests/test_accessibility_checks.py.