You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Move from JavaScript to TypeScript
- Bumped the minimum `@reactpy/client` version to `0.3.1`
- Create a Django-specific client
- Minor refactoring to various bits of code
- Bumped minimum Django version to `4.2`.
- More customization for reconnection behavior through new settings!
- `REACTPY_RECONNECT_INTERVAL`
- `REACTPY_RECONNECT_MAX_INTERVAL`
- `REACTPY_RECONNECT_MAX_RETRIES`
- `REACTPY_RECONNECT_BACKOFF_MULTIPLIER`
Copy file name to clipboardExpand all lines: CHANGELOG.md
+13
Original file line number
Diff line number
Diff line change
@@ -36,13 +36,26 @@ Using the following categories, list your changes in this order:
36
36
37
37
### Added
38
38
39
+
- More customization for reconnection behavior through new settings!
40
+
-`REACTPY_RECONNECT_INTERVAL`
41
+
-`REACTPY_RECONNECT_MAX_INTERVAL`
42
+
-`REACTPY_RECONNECT_MAX_RETRIES`
43
+
-`REACTPY_RECONNECT_BACKOFF_MULTIPLIER`
39
44
-[ReactPy-Django docs](https://reactive-python.github.io/reactpy-django/) are now version controlled via [mike](https://github.com/jimporter/mike)!
40
45
41
46
### Changed
42
47
43
48
- Bumped the minimum ReactPy version to `1.0.2`.
44
49
- Prettier websocket URLs for components that do not have sessions.
45
50
- Template tag will now only validate `args`/`kwargs` if `settings.py:DEBUG` is enabled.
51
+
- Bumped the minimum `@reactpy/client` version to `0.3.1`
52
+
- Use TypeScript instead of JavaScript for this repository.
53
+
- Bumped minimum Django version to `4.2`.
54
+
- Note: ReactPy-Django will continue bumping minimum Django requirements to versions that increase async support. This "latest-only" trend will continue until Django has all async features that ReactPy benefits from. After this point, ReactPy-Django will begin supporting all maintained Django versions.
55
+
56
+
### Removed
57
+
58
+
-`settings.py:REACTPY_RECONNECT_MAX` is removed. See the docs for the new `REACTPY_RECONNECT_*` settings.
Copy file name to clipboardExpand all lines: docs/src/features/settings.md
+5-1
Original file line number
Diff line number
Diff line change
@@ -24,11 +24,15 @@ These are ReactPy-Django's default settings values. You can modify these values
24
24
| --- | --- | --- | --- |
25
25
|`REACTPY_CACHE`|`#!python "default"`|`#!python "my-reactpy-cache"`| Cache used to store ReactPy web modules. ReactPy benefits from a fast, well indexed cache.<br/>We recommend installing [`redis`](https://redis.io/) or [`python-diskcache`](https://grantjenks.com/docs/diskcache/tutorial.html#djangocache). |
26
26
|`REACTPY_DATABASE`|`#!python "default"`|`#!python "my-reactpy-database"`| Database used to store ReactPy session data. ReactPy requires a multiprocessing-safe and thread-safe database.<br/>If configuring `REACTPY_DATABASE`, it is mandatory to use our database router like such:<br/>`#!python DATABASE_ROUTERS = ["reactpy_django.database.Router", ...]`|
27
-
|`REACTPY_RECONNECT_MAX`|`#!python 259200`|`#!python 96000`, `#!python 60`, `#!python 0`| Maximum seconds between reconnection attempts before giving up.<br/>Use `#!python 0` to prevent reconnection. |
27
+
|`REACTPY_SESSION_MAX_AGE`|`#!python 259200`|`#!python 0`, `#!python 60`, `#!python 96000`| Maximum seconds to store ReactPy session data, such as `args` and `kwargs` passed into your component template tag.<br/>Use `#!python 0` to not store any session data. |
28
28
|`REACTPY_URL_PREFIX`|`#!python "reactpy/"`|`#!python "rp/"`, `#!python "render/reactpy/"`| The prefix to be used for all ReactPy websocket and HTTP URLs. |
29
29
|`REACTPY_DEFAULT_QUERY_POSTPROCESSOR`|`#!python "reactpy_django.utils.django_query_postprocessor"`|`#!python "example_project.my_query_postprocessor"`| Dotted path to the default `reactpy_django.hooks.use_query` postprocessor function. |
30
30
|`REACTPY_AUTH_BACKEND`|`#!python "django.contrib.auth.backends.ModelBackend"`|`#!python "example_project.auth.MyModelBackend"`| Dotted path to the Django authentication backend to use for ReactPy components. This is only needed if:<br/> 1. You are using `AuthMiddlewareStack` and...<br/> 2. You are using Django's `AUTHENTICATION_BACKENDS` setting and...<br/> 3. Your Django user model does not define a `backend` attribute. |
31
31
|`REACTPY_BACKHAUL_THREAD`|`#!python False`|`#!python True`| Whether to render ReactPy components in a dedicated thread. This allows the webserver to process web traffic while during ReactPy rendering.<br/>Vastly improves throughput with web servers such as `hypercorn` and `uvicorn`. |
32
32
|`REACTPY_DEFAULT_HOSTS`|`#!python None`|`#!python ["localhost:8000", "localhost:8001", "localhost:8002/subdir" ]`| The default host(s) that can render your ReactPy components. ReactPy will use these hosts in a round-robin fashion, allowing for easy distributed computing.<br/>You can use the `host` argument in your [template tag](../features/template-tag.md#component) as a manual override. |
33
+
|`REACTPY_RECONNECT_INTERVAL`|`#!python 750`|`#!python 100`, `#!python 2500`, `#!python 6000`| Milliseconds between client reconnection attempts. This value will gradually increase if `REACTPY_RECONNECT_BACKOFF_MULTIPLIER` is greater than `#!python 1`. |
34
+
|`REACTPY_RECONNECT_MAX_INTERVAL`|`#!python 60000`|`#!python 10000`, `#!python 25000`, `#!python 900000`| Maximum milliseconds between client reconnection attempts. This allows setting an upper bound on how high `REACTPY_RECONNECT_BACKOFF_MULTIPLIER` can increase the time between reconnection attempts. |
35
+
|`REACTPY_RECONNECT_MAX_RETRIES`|`#!python 150`|`#!python 0`, `#!python 5`, `#!python 300`| Maximum number of reconnection attempts before the client gives up. |
36
+
|`REACTPY_RECONNECT_BACKOFF_MULTIPLIER`|`#!python 1.25`|`#!python 1`, `#!python 1.5`, `#!python 3`| Multiplier for the time between client reconnection attempts. On each reconnection attempt, the `REACTPY_RECONNECT_INTERVAL` will be multiplied by this to increase the time between attempts. You can keep time between each reconnection the same by setting this to `#!python 1`. |
Copy file name to clipboardExpand all lines: docs/src/get-started/run-webserver.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ To test your new Django view, run the following command to start up a developmen
16
16
python manage.py runserver
17
17
```
18
18
19
-
Now you can navigate to your **Django project** URL that contains a ReactPy component, such as `http://127.0.0.1:8000/example/` ([_from the previous step_](./register-view.md)).
19
+
Now you can navigate to your **Django project** URL that contains a ReactPy component, such as [`http://127.0.0.1:8000/example/`](http://127.0.0.1:8000/example/) ([_from the previous step_](./register-view.md)).
20
20
21
21
If you copy-pasted our example component, you will now see your component display "Hello World".
0 commit comments