From add0d30f1b991c38efa736956fd980e94c098912 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Wed, 10 Jan 2024 02:39:33 -0800 Subject: [PATCH 1/2] v3.6.0 --- CHANGELOG.md | 7 ++++++- docs/src/reference/hooks.md | 16 ++++++++-------- docs/src/reference/router.md | 4 +++- src/reactpy_django/__init__.py | 2 +- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5dc50df..c4db5e61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,10 @@ Using the following categories, list your changes in this order: ## [Unreleased] +- Nothing (yet)! + +## [3.6.0] - 2024-01-10 + ### Added - Built-in Single Page Application (SPA) support! @@ -433,7 +437,8 @@ Using the following categories, list your changes in this order: - Support for IDOM within the Django -[unreleased]: https://github.com/reactive-python/reactpy-django/compare/3.5.1...HEAD +[unreleased]: https://github.com/reactive-python/reactpy-django/compare/3.6.0...HEAD +[3.6.0]: https://github.com/reactive-python/reactpy-django/compare/3.5.1...3.6.0 [3.5.1]: https://github.com/reactive-python/reactpy-django/compare/3.5.0...3.5.1 [3.5.0]: https://github.com/reactive-python/reactpy-django/compare/3.4.0...3.5.0 [3.4.0]: https://github.com/reactive-python/reactpy-django/compare/3.3.2...3.4.0 diff --git a/docs/src/reference/hooks.md b/docs/src/reference/hooks.md index 3ba03266..14217aa4 100644 --- a/docs/src/reference/hooks.md +++ b/docs/src/reference/hooks.md @@ -18,7 +18,7 @@ Prefabricated hooks can be used within your `components.py` to help simplify dev --- -### `#!python use_query(query, *args, **kwargs)` +### Use Query Execute functions in the background and return the result, typically to [read](https://www.sumologic.com/glossary/crud/) data from the Django ORM. @@ -164,7 +164,7 @@ Query functions can be sync or async. --- -### `#!python use_mutation(mutation, refetch=None)` +### Use Mutation Modify data in the background, typically to [create/update/delete](https://www.sumologic.com/glossary/crud/) data from the Django ORM. @@ -273,7 +273,7 @@ Mutation functions can be sync or async. --- -### `#!python use_user_data(default_data=None, save_default_data=False)` +### Use User Data Store or retrieve data (`#!python dict`) specific to the connection's `#!python User`. This data is stored in the `#!python REACTPY_DATABASE`. @@ -316,7 +316,7 @@ Store or retrieve data (`#!python dict`) specific to the connection's `#!python --- -### `#!python use_connection()` +### Use Connection Returns the active connection, which is either a Django [WebSocket](https://channels.readthedocs.io/en/stable/topics/consumers.html#asyncjsonwebsocketconsumer) or a [HTTP Request](https://docs.djangoproject.com/en/4.2/ref/request-response/#django.http.HttpRequest). @@ -340,7 +340,7 @@ Returns the active connection, which is either a Django [WebSocket](https://chan --- -### `#!python use_scope()` +### Use Scope Shortcut that returns the WebSocket or HTTP connection's [scope](https://channels.readthedocs.io/en/stable/topics/consumers.html#scope). @@ -364,7 +364,7 @@ Shortcut that returns the WebSocket or HTTP connection's [scope](https://channel --- -### `#!python use_location()` +### Use Location Shortcut that returns the browser's current `#!python Location`. @@ -386,7 +386,7 @@ Shortcut that returns the browser's current `#!python Location`. | --- | --- | | `#!python Location` | An object containing the current URL's `#!python pathname` and `#!python search` query. | -### `#!python use_origin()` +### Use Origin Shortcut that returns the WebSocket or HTTP connection's `#!python origin`. @@ -412,7 +412,7 @@ You can expect this hook to provide strings such as `http://example.com`. --- -### `#!python use_user()` +### Use User Shortcut that returns the WebSocket or HTTP connection's `#!python User`. diff --git a/docs/src/reference/router.md b/docs/src/reference/router.md index 7a280c6d..6b35166a 100644 --- a/docs/src/reference/router.md +++ b/docs/src/reference/router.md @@ -14,7 +14,9 @@ A variant of [`reactpy-router`](https://github.com/reactive-python/reactpy-route --- -## `#!python django_router(*routes)` +## Django Router + +URL router that enables the ability to conditionally render other components based on the client's current URL `#!python path`. === "components.py" diff --git a/src/reactpy_django/__init__.py b/src/reactpy_django/__init__.py index fb9ed61d..6ff88b00 100644 --- a/src/reactpy_django/__init__.py +++ b/src/reactpy_django/__init__.py @@ -8,7 +8,7 @@ REACTPY_WEBSOCKET_ROUTE, ) -__version__ = "3.5.1" +__version__ = "3.6.0" __all__ = [ "REACTPY_WEBSOCKET_PATH", "REACTPY_WEBSOCKET_ROUTE", From 403a6cdb6e170817056e1a3a205cd1f3daa73678 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Wed, 10 Jan 2024 02:42:46 -0800 Subject: [PATCH 2/2] add dash to reactpy-django name --- CHANGELOG.md | 2 +- docs/src/about/code.md | 4 ++-- tests/test_app/settings_multi_db.py | 2 +- tests/test_app/settings_single_db.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4db5e61..004520c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -217,7 +217,7 @@ Using the following categories, list your changes in this order: ### Changed -- `django-reactpy` database entries are no longer cleaned during Django application startup. Instead, it will occur on webpage loads if `REACTPY_RECONNECT_MAX` seconds has elapsed since the last cleaning. +- `reactpy-django` database entries are no longer cleaned during Django application startup. Instead, it will occur on webpage loads if `REACTPY_RECONNECT_MAX` seconds has elapsed since the last cleaning. ## [3.0.0-reactpy] - 2023-03-30 diff --git a/docs/src/about/code.md b/docs/src/about/code.md index bc3d8ecc..77d6eb60 100644 --- a/docs/src/about/code.md +++ b/docs/src/about/code.md @@ -28,7 +28,7 @@ git clone https://github.com/reactive-python/reactpy-django.git cd reactpy-django ``` -Then, by running the command below you can install the dependencies needed to run the ReactPy Django development environment. +Then, by running the command below you can install the dependencies needed to run the ReactPy-Django development environment. ```bash linenums="0" pip install -r requirements.txt --upgrade --verbose @@ -38,7 +38,7 @@ pip install -r requirements.txt --upgrade --verbose Some of our development dependencies require a C++ compiler, which is not installed by default on Windows. If you receive errors related to this during installation, follow the instructions in your console errors. - Additionally, be aware that ReactPy Django's JavaScript bundle is built within the following scenarios: + Additionally, be aware that ReactPy-Django's JavaScript bundle is built within the following scenarios: 1. When `pip install` is run on the `reactpy-django` package. 2. Every time `python manage.py ...` or `nox ...` is run diff --git a/tests/test_app/settings_multi_db.py b/tests/test_app/settings_multi_db.py index ef9a2478..bb1fcf5a 100644 --- a/tests/test_app/settings_multi_db.py +++ b/tests/test_app/settings_multi_db.py @@ -155,5 +155,5 @@ }, } -# ReactPy Django Settings +# ReactPy-Django Settings REACTPY_BACKHAUL_THREAD = "test" not in sys.argv and "runserver" not in sys.argv diff --git a/tests/test_app/settings_single_db.py b/tests/test_app/settings_single_db.py index f9eb49d4..e98a63a7 100644 --- a/tests/test_app/settings_single_db.py +++ b/tests/test_app/settings_single_db.py @@ -136,5 +136,5 @@ }, } -# ReactPy Django Settings +# ReactPy-Django Settings REACTPY_BACKHAUL_THREAD = "test" not in sys.argv and "runserver" not in sys.argv