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
+7-10
Original file line number
Diff line number
Diff line change
@@ -36,20 +36,17 @@ 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
-
- New components!
39
+
- 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
+
- New `view_to_iframe` feature!
43
43
-`reactpy_django.components.view_to_iframe` uses an `<iframe>` to render a Django view.
44
-
- New utilies!
45
44
-`reactpy_django.utils.register_iframe` notifies ReactPy which views are allowed to be used with `view_to_iframe`.
46
-
- New decorators!
47
-
-`reactpy_django.decorators.user_passes_test` is a similar equivalent to Django's `user_passes_test` decorator, but ours works with ReactPy components.
48
-
- New hooks!
45
+
- New Django `User` related features!
49
46
-`reactpy_django.hooks.use_user` can be used to access the current user.
50
47
-`reactpy_django.hooks.use_user_data` provides a simplified interface for storing user key-value data.
51
-
-New settings!
52
-
-`REACTPY_AUTO_LOGIN` automatically logs in **pre-authenticated** users that during the initial component WebSocket connection. This is useful to continuously update `last_login` timestamps.
48
+
-`reactpy_django.decorators.user_passes_test` is inspired by Django's [`user_passes_test`](http://docs.djangoproject.com/en/dev/topics/auth/default/#django.contrib.auth.decorators.user_passes_test) decorator, but works with ReactPy components.
49
+
-`settings.py:REACTPY_AUTO_RELOGIN` will cause component WebSocket connections to automatically perform a re-login on authenticated users. This is useful to continuously update `last_login` timestamps and refresh the [Django login session](https://docs.djangoproject.com/en/dev/topics/http/sessions/).
Copy file name to clipboardExpand all lines: docs/src/reference/settings.md
+13-1
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,18 @@ Dotted path to the Django authentication backend to use for ReactPy components.
62
62
63
63
---
64
64
65
+
### `#!python REACTPY_AUTO_RELOGIN`
66
+
67
+
**Default:**`#!python False`
68
+
69
+
**Example Value(s):**`#!python True`
70
+
71
+
Enabling this will cause component WebSocket connections to automatically perform a [re-login](https://channels.readthedocs.io/en/latest/topics/authentication.html#how-to-log-a-user-in-out) on users that are already authenticated.
72
+
73
+
This is useful to continuously update `#!python last_login` timestamps and refresh the [Django login session](https://docs.djangoproject.com/en/dev/topics/http/sessions/).
74
+
75
+
---
76
+
65
77
## Performance Settings
66
78
67
79
---
@@ -128,7 +140,7 @@ You can use the `#!python host` argument in your [template tag](../reference/tem
128
140
129
141
**Example Value(s):**`#!python True`
130
142
131
-
Configures whether to pre-render your components, which enables SEO compatibility and reduces perceived latency.
143
+
Configures whether to HTTP pre-render your components, which enables SEO compatibility and reduces perceived latency.
132
144
133
145
During pre-rendering, there are some key differences in behavior:
0 commit comments