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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+25-9Lines changed: 25 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -36,22 +36,38 @@ Using the following categories, list your changes in this order:
36
36
37
37
### Added
38
38
39
-
- ReactPy components can now use SEO compatible rendering!
40
-
-`settings.py:REACTPY_PRERENDER` can be set to `True` to enable this behavior by default
41
-
- Or, you can enable it on individual components via the template tag: `{% component "..." prerender="True" %}`
42
-
-`reactpy_django.components.view_to_iframe` component has been added, which uses an `<iframe>` to render a Django view.
43
-
-`reactpy_django.utils.register_iframe` function has been added, which is mandatory to use alongside `reactpy_django.components.view_to_iframe`.
39
+
- SEO compatible rendering!
40
+
-`settings.py:REACTPY_PRERENDER` can be set to `True` to make components pre-render by default.
41
+
- Or, you can enable it on individual components via the template tag: `{% component "..." prerender="True" %}`.
42
+
- New `view_to_iframe` feature!
43
+
-`reactpy_django.components.view_to_iframe` uses an `<iframe>` to render a Django view.
44
+
-`reactpy_django.utils.register_iframe` tells ReactPy which views `view_to_iframe` can use.
45
+
- New Django `User` related features!
46
+
-`reactpy_django.hooks.use_user` can be used to access the current user.
47
+
-`reactpy_django.hooks.use_user_data` provides a simplified interface for storing user key-value data.
48
+
-`reactpy_django.decorators.user_passes_test` is inspired by the [equivalent Django decorator](http://docs.djangoproject.com/en/dev/topics/auth/default/#django.contrib.auth.decorators.user_passes_test), but ours works with ReactPy components.
49
+
-`settings.py:REACTPY_AUTO_RELOGIN` will cause component WebSocket connections to automatically [re-login](https://channels.readthedocs.io/en/latest/topics/authentication.html#how-to-log-a-user-in-out) users that are already authenticated. This is useful to continuously update `last_login` timestamps and refresh the [Django login session](https://docs.djangoproject.com/en/dev/topics/http/sessions/).
44
50
45
51
### Changed
46
52
47
-
- Renamed undocumented utility function `reactpy_django.utils.ComponentPreloader` to `reactpy_django.utils.RootComponentFinder`.
53
+
- Renamed undocumented utility function `ComponentPreloader` to `RootComponentFinder`.
48
54
- It is now recommended to call `as_view()` when using `view_to_component` or `view_to_iframe` with Class Based Views.
49
-
- Thread sensitivity has been enabled in all locations where ORM queries are possible.
55
+
- For thread safety, `thread_sensitive=True` has been enabled in all `sync_to_async` functions where ORM queries are possible.
56
+
-`reactpy_django.hooks.use_mutation` now has a `__call__` method. So rather than writing `my_mutation.execute(...)`, you can now write `my_mutation(...)`.
50
57
51
58
### Deprecated
52
59
53
-
- The `compatibility` argument on `reactpy_django.components.view_to_component` is deprecated. Use `reactpy_django.components.view_to_iframe` instead.
54
-
- Using `reactpy_django.components.view_to_component` as a decorator is deprecated. Check the docs on the new suggested usage.
60
+
- The `compatibility` argument on `reactpy_django.components.view_to_component` is deprecated.
61
+
- Use `view_to_iframe` as a replacement.
62
+
-`reactpy_django.components.view_to_component`**usage as a decorator** is deprecated.
63
+
- Check the docs on how to use `view_to_component` as a function instead.
64
+
-`reactpy_django.decorators.auth_required` is deprecated.
65
+
- Use `reactpy_django.decorators.user_passes_test` instead.
66
+
- An equivalent to `auth_required`'s default is `@user_passes_test(lambda user: user.is_active)`.
67
+
68
+
### Fixed
69
+
70
+
- Fixed a bug where exception stacks would not print on failed component renders.
0 commit comments