Hx-requests

Latest version: v0.33.0

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 14

0.33.0

Breaking

* cleanup package versions ([`ed928a0`](https://github.com/yaakovLowenstein/hx-requests/commit/ed928a0049dadd4871c95404879dc0c7b1aa4e72))

Documentation

* Update CHANGELOG.md ([`c537c8a`](https://github.com/yaakovLowenstein/hx-requests/commit/c537c8a97c2d8485325fe45fc087f5b064106844))

0.32.1

Fix

* Fix bug with get_views_context ([`f6ed918`](https://github.com/yaakovLowenstein/hx-requests/commit/f6ed918e4dbbf5cd4845da17a0d1174055fb2e1f))

0.32.0

Feature

* Add refresh_views_context_on_POST to BaseHXRequest ([`bce66bd`](https://github.com/yaakovLowenstein/hx-requests/commit/bce66bd7f6bf1121b60b25bde7f6aa7d8e3f9c58))

Documentation

* Add docs for refresh_views_context_on_POST ([`723a491`](https://github.com/yaakovLowenstein/hx-requests/commit/723a491af621ec446edfc91c802e44295348304e))
* Add motivation page ([`1c0cd57`](https://github.com/yaakovLowenstein/hx-requests/commit/1c0cd5788ca688662e555382db41a7e3415b388a))

0.31.1

Fix

* Update changelog for breaking changes ([`8df969f`](https://github.com/yaakovLowenstein/hx-requests/commit/8df969f124f9cce3146df045e51a671ade8423c5))

0.31.0

This version is a major update with lots of breaking changes. However, still only a minor version bump
because the package is still under development. Though, this release gets us closer to a mature package
and a 1.0.0 release

Feature

* Add hx_url template tag ([`3c47bbb`](https://github.com/yaakovLowenstein/hx-requests/commit/3c47bbb6e0be54ce97c3291eda656d7031e1e523))
* Use RequestContext for hx_request context ([`b4e19fc`](https://github.com/yaakovLowenstein/hx-requests/commit/b4e19fccfcd1a29153df59db30a52d9cf78a3e1e))
* Change the way HXRequests are registered ([`ea2ee74`](https://github.com/yaakovLowenstein/hx-requests/commit/ea2ee742575534fce71e033e3e489b6608bf95b4))

Fix

* Fix bug in HtmxViewMixin._get_hx_request_classes ([`e797a2e`](https://github.com/yaakovLowenstein/hx-requests/commit/e797a2ea5c47a144fdc547b3971ef86d64ad276a))
* Raise an exception if duplicate HXRequest names are found ([`7c9fa47`](https://github.com/yaakovLowenstein/hx-requests/commit/7c9fa47a2cdf51fada1e61adabe5f44de5c5caaa))

Documentation

* Update docs to reflect changes in messages setting ([`5865870`](https://github.com/yaakovLowenstein/hx-requests/commit/5865870ecee3d4dd9f72c7d39adf5a28c02ec841))
* Update docs for delete HX request ([`6c6b94b`](https://github.com/yaakovLowenstein/hx-requests/commit/6c6b94bdaf0d769fc168828d3dc3b3d2463becb8))

Breaking

* hx_requests no longer have an extra_context attribute.
* The hx_messages module has been removed.
Messages are now set using Django's messaging framework.
The HXMessages class has been removed and the messages attribute
has been removed from the BaseHXRequest class. Messages are
now set using Django's messages module.

`self.messages.success()` has been replaced with`messages.success(request, message)`
and the same for `self.messages.error()`, `self.messages.warning()`,
`self.messages.info()` and `self.messages.debug()`. ([`35caf9a`](https://github.com/yaakovLowenstein/hx-requests/commit/35caf9a58ae4a5eee78c7de8200bff177bc13e29))
* `DeleteHXRequest`'s `handle_delete` has been updated to `delete`. If you have overridden `handle_delete`
in your `DeleteHXRequest`, you will need to change it to `delete`. ([`4022933`](https://github.com/yaakovLowenstein/hx-requests/commit/4022933d26db5d649eba12efa1346fd296ea29f0))
* modalFormValid is renamed to closeHxModal. All trigger's of modalFormValid need to be replaced with closeHxModal.
The modal template as well will need to be updated to handle closeHxModal.(and if using Alpin.js modal-form-valid
needs to be changed to close-hx-modal) ([`786c6a3`](https://github.com/yaakovLowenstein/hx-requests/commit/786c6a334d5227bc7d158f58bdbe609422080e37))
* The render_hx template tag has been removed.
It has been replaced by the hx_get and hx_post template tags.
The hx_get and hx_post template tags are more explicit
and easier to understand. The render_hx template tag was
confusing and not as clear as the hx_get and hx_post template tags. ([`0018ca5`](https://github.com/yaakovLowenstein/hx-requests/commit/0018ca563170d9cd9100b80ce9c26c139d856afe))
* `get_post_context_data` has been renamed to `get_context_on_POST` for consistency with the other methods. ([`971ec74`](https://github.com/yaakovLowenstein/hx-requests/commit/971ec74d0e07e2c94b83fcc425ae9ca30395dfb8))
* Underscores have been added to private methods
in the hx_requests module.

setup_hx_request -> _setup_hx_request
render_templates -> _render_templates
get_messages_html -> _get_messages_html
get_response -> _get_response ([`7af28b3`](https://github.com/yaakovLowenstein/hx-requests/commit/7af28b3f2316321b247babf75679e9e6dc52ff42))
* Default message setting was moved from the post method to form_valid and form_invalid.
Therefore if form_valid or form_invalid are overridden messages need to be explicitly set
in those methods. ([`bcf9df2`](https://github.com/yaakovLowenstein/hx-requests/commit/bcf9df2758830d055d4b796558ac62ede4b71057))
* The way the view's context is added to the hx-request's context has changed. The new way is more efficient but is also breaking.
The view's context is now setup prior to the form_valid. Therefore updates in the form_valid will not be reflected
in the context of the POST_template. To refresh the view's context for the POST_template, set refresh_views_context_on_POST to True.
**Note**: This is only really needed in detail views. List views use querysets which are lazy evaluated and therefore do pick up
on changes made in form_valid. The detail view uses a model instance and therefore is evaluated.
What's Changed
* Major Changes by yaakovLowenstein in https://github.com/yaakovLowenstein/hx-requests/pull/102


**Full Changelog**: https://github.com/yaakovLowenstein/hx-requests/compare/v0.30.0...v0.31.0

0.30.0

Feature

* Add get_context_on_GET ([`d31f4e6`](https://github.com/yaakovLowenstein/hx-requests/commit/d31f4e67bfe0a58e57394d5ef8af01a37f8f631e))

Page 1 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.