docs(#13): documentation overhaul - #209
Merged
Merged
Conversation
yaakovLowenstein
force-pushed
the
audit2/test-suite-improvements
branch
2 times, most recently
from
July 9, 2026 17:14
4e8782d to
1cf31ed
Compare
Both tutorials issue requests as an anonymous user, but HX_REQUESTS_REQUIRE_AUTH
defaults to True, so the first click 404'd. Add a settings step relaxing the
gate (pointing at the securing how-to for real setups). Also fix a stale
cross-reference to the messages how-to ("How To Use Messages" -> the actual
"How To Set Messages" title).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- `blocks = "content"` is not an attribute; the block attribute is GET_block.
- get_or_create returns a (user, created) tuple, so context["user"] held the
tuple and {{ user.username }} rendered nothing -- unpack the user.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
`from hx_requests import FormHxRequest` raises ImportError -- the package __init__ only exposes __version__. Import from hx_requests.hx_requests, as the basic tutorial already does for BaseHxRequest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
With kwargs_as_context = False the kwargs are placed in the context under hx_kwargs (get_context_data), not kwargs. Fix the prose and the template snippet (and a "tmeplate" typo). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There is no self.messages attribute; messages go through Django's messages.error(self.request, ...). Also fix the hook signature (form_invalid(self, **kwargs)) and the super() call (**kwargs). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Both pages named get_post_context_data / refresh_views_context_on_post (neither exists). The actual names are get_context_on_POST and refresh_views_context_on_POST. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The old warning said setting GET_template to an empty string suppresses the view's template. It does not: a falsy GET_template falls back to the view's template, and the dict-blocks render path always appends the resolved template in full after the blocks. Rewrite the warning to describe the append behavior and set the example to a real target template. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- HX_REQUESTS_MODAL_BODY_ID is a CSS selector used as the HX-Retarget value, so its default is #hx_modal_body; the docs showed hx_modal_body (missing #), which breaks form-error retargeting. - closeHxModal is triggered by FormModalHxRequest, not the nonexistent HxModalHxRequest. - Fix the malformed FormHxRequest cross-reference. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
These publish via autoapi. DeleteHxRequest said to override handle_delete; the hook is delete. ModalHxRequest claimed a classless 'hx-modal' usage that was never registered; describe the real usage (subclass it, set name and GET_template). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- add_headers: header names are HX-Trigger/HX-Redirect/HX-Refresh (not
Hx-Triggers); the dynamic-redirect example called super().form_invalid(form)
with an undefined `form` -> **kwargs.
- add_form_kwargs: get_initial was missing self.
- detect_hx_request: is_hx_request checks the signature only, not that the
name is registered.
- how_hx_requests_works: note the MRO-ordering caveat (W001) -- auth mixins
must precede HtmxViewMixin to gate the handoff path.
- config: HX_REQUESTS_GLOBAL_ALLOW / HX_REQUESTS_UNAUTHENTICATED_ALLOW default
to None, not [] / {}.
- CHANGELOG: complete the truncated v0.48.0 breaking-change note.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- README: add an Installation section noting the Python 3.11+ / Django 4.2+
floors.
- config: document HX_REQUESTS_BIND_TOKEN_TO_PATH (the path-binding kill
switch), which was missing from the settings reference.
- hx_tags reference: document the {% hx_url %} tag (returns just the signed
URL for building custom request attributes).
- add_headers: document the phase-keyed get_triggers dict
(HX-Trigger / -After-Settle / -After-Swap) and trigger_header_map.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The test-suite design spec was an internal working document that slipped into the published docs tree (it was never in any toctree). Remove it and gitignore docs/superpowers/ and .claude/ so local agent/spec working files don't get committed again. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The serialization explanation still described the old scheme where each kwarg was ``___``-prefixed inside the signed token. The code stores kwargs under their real names in the token's ``kwargs`` sub-dict with no prefix (serialize_kwargs / deserialize_kwargs). Update the explanation and the two stale ``___``-prefixed examples (detect_hx_request, securing_hx_requests), and correct the "two ways to register" count to match the three documented approaches. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
yaakovLowenstein
force-pushed
the
audit2/docs-overhaul
branch
from
July 9, 2026 18:00
4decdad to
4dd9444
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Audit round 2, item #13. Stacked PR 6 of 6, base
audit2/test-suite-improvements. One commit per fix:FormHxRequestimport,GET_block, and theget_or_createtuple.hx_kwargsname, context-refresh hook names, the OOB dict-blocks warning, themore_how_tosform_invalidexample, and the modal how-to (selector, class name, broken ref).DeleteHxRequest/ModalHxRequestdocstrings and an assortment of small doc inaccuracies (header names,get_initialself,is_hx_requestsemantics, W001 MRO caveat, config defaults, truncated CHANGELOG note).HX_REQUESTS_BIND_TOKEN_TO_PATH,{% hx_url %}, and the phase-keyed trigger dict.Note: the tutorial-auth fix is adapted to this 0.51.0 base (which excludes #201); revisit once per-handler auth lands.
🤖 Generated with Claude Code