Skip to content

v1.2.0 #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Using the following categories, list your changes in this order:

## [Unreleased]

- Nothing (Yet)

## [1.2.0] - 2022-09-19

### Added

- `auth_required` decorator to prevent your components from rendering to unauthenticated users.
Expand All @@ -32,6 +36,7 @@ Using the following categories, list your changes in this order:
### Changed

- Bumped the minimum IDOM version to 0.40.2
- Testing suite now uses `playwright` instead of `selenium`

### Fixed

Expand Down Expand Up @@ -125,7 +130,8 @@ Using the following categories, list your changes in this order:

- Support for IDOM within the Django

[unreleased]: https://github.com/idom-team/django-idom/compare/1.0.0...HEAD
[unreleased]: https://github.com/idom-team/django-idom/compare/1.2.0...HEAD
[1.2.0]: https://github.com/idom-team/django-idom/compare/1.1.0...1.2.0
[1.1.0]: https://github.com/idom-team/django-idom/compare/1.0.0...1.1.0
[1.0.0]: https://github.com/idom-team/django-idom/compare/0.0.5...1.0.0
[0.0.5]: https://github.com/idom-team/django-idom/compare/0.0.4...0.0.5
Expand Down
1 change: 0 additions & 1 deletion docs/src/contribute/django-idom.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ If you plan to make code changes to this repository, you'll need to install the
- [Python 3.8+](https://www.python.org/downloads/)
- [Git](https://git-scm.com/downloads)
- [NPM](https://docs.npmjs.com/try-the-latest-stable-version-of-npm) for installing and managing Javascript
- [ChromeDriver](https://chromedriver.chromium.org/downloads) for testing with [Selenium](https://www.seleniumhq.org/)

Once done, you should clone this repository:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/features/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ Convert any Django view into a IDOM component by usng this decorator. Compatible
| Name | Type | Description | Default |
| --- | --- | --- | --- |
| view | `Callable | View` | The view function or class to convert. | N/A |
| compatibility | `bool` | If True, the component will be rendered in an iframe. Strict parsing does not apply to compatibility mode. | `False` |
| compatibility | `bool` | If True, the component will be rendered in an iframe. When using compatibility mode `tranforms`, `strict_parsing`, and `request` arguments will be ignored. | `False` |
| transforms | `Iterable[Callable[[VdomDict], Any]]` | A list of functions that transforms the newly generated VDOM. The functions will be called on each VDOM node. | `tuple` |
| strict_parsing | `bool` | If True, an exception will be generated if the HTML does not perfectly adhere to HTML5. | `True` |
| request | `HttpRequest | None` | Request object to provide to the view. Custom request objects cannot be used in compatibility mode. | `None` |
| request | `HttpRequest | None` | Request object to provide to the view. | `None` |
| args | `Iterable` | The positional arguments to pass to the view. | `tuple` |
| kwargs | `Dict | None` | The keyword arguments to pass to the view. | `None` |

Expand Down Expand Up @@ -93,7 +93,7 @@ Convert any Django view into a IDOM component by usng this decorator. Compatible

For views that rely on HTTP responses other than `GET` (such as `PUT`, `POST`, `PATCH`, etc), you should consider using compatibility mode to render your view within an iframe.

Any view can be rendered within compatibility mode. However, the `strict_parsing` argument does not apply to compatibility mode.
Any view can be rendered within compatibility mode. However, the `transforms`, `strict_parsing`, and `request` arguments do not apply to compatibility mode.

Please note that by default the iframe is unstyled, and thus won't look pretty until you add some CSS.

Expand Down
2 changes: 1 addition & 1 deletion src/django_idom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django_idom.websocket.paths import IDOM_WEBSOCKET_PATH


__version__ = "1.1.0"
__version__ = "1.2.0"
__all__ = [
"IDOM_WEBSOCKET_PATH",
"IdomWebsocket",
Expand Down
4 changes: 2 additions & 2 deletions src/django_idom/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ def view_to_component(

Keyword Args:
compatibility: If True, the component will be rendered in an iframe.
Strict parsing does not apply to compatibility mode.
When using compatibility mode `tranforms`, `strict_parsing`, and `request`
arguments will be ignored.
transforms: A list of functions that transforms the newly generated VDOM.
The functions will be called on each VDOM node.
strict_parsing: If True, an exception will be generated if the HTML does not
perfectly adhere to HTML5.
request: Request object to provide to the view.
Custom request objects cannot be used in compatibility mode.
args: The positional arguments to pass to the view.
kwargs: The keyword arguments to pass to the view.
"""
Expand Down