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: develop/about/changelog/index.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
If you see this page, you probably meant to visit the other CHANGELOG.md (all caps).
4
4
5
-
--> <p class=intro> The format is based on <a href=https://keepachangelog.com/en/1.0.0/ >Keep a Changelog</a>, and this project adheres to <a href=https://semver.org/spec/v2.0.0.html>Semantic Versioning</a>. </p> <hr> <h2 id=unreleased><a href=https://github.com/reactive-python/reactpy-django/compare/5.1.0...HEAD>Unreleased</a><a class=headerlink href=#unreleased title="Permanent link">¶</a></h2> <h3 id=fixed>Fixed<a class=headerlink href=#fixed title="Permanent link">¶</a></h3> <ul> <li>Fixed regression in v5.1.0 where components would sometimes not output debug messages when <code>settings.py:DEBUG</code> is enabled.</li> </ul> <h3 id=changed>Changed<a class=headerlink href=#changed title="Permanent link">¶</a></h3> <ul> <li>Set upper limit on ReactPy version to <code><2.0.0</code>.</li> </ul> <h2 id=510-2024-11-24><a href=https://github.com/reactive-python/reactpy-django/compare/5.0.0...5.1.0>5.1.0</a> - 2024-11-24<a class=headerlink href=#510-2024-11-24 title="Permanent link">¶</a></h2> <h3 id=added>Added<a class=headerlink href=#added title="Permanent link">¶</a></h3> <ul> <li><code>settings.py:REACTPY_ASYNC_RENDERING</code> to enable asynchronous rendering of components.</li> </ul> <h3 id=changed_1>Changed<a class=headerlink href=#changed_1 title="Permanent link">¶</a></h3> <ul> <li>Bumped the minimum ReactPy version to <code>1.1.0</code>.</li> </ul> <h2 id=500-2024-10-22><a href=https://github.com/reactive-python/reactpy-django/compare/4.0.0...5.0.0>5.0.0</a> - 2024-10-22<a class=headerlink href=#500-2024-10-22 title="Permanent link">¶</a></h2> <h3 id=changed_2>Changed<a class=headerlink href=#changed_2 title="Permanent link">¶</a></h3> <ul> <li>Now using ReactPy-Router v1 for URL routing, which comes with a slightly different API than before.</li> <li>Removed dependency on <code>aiofile</code>.</li> </ul> <h3 id=removed>Removed<a class=headerlink href=#removed title="Permanent link">¶</a></h3> <ul> <li>Removed the following <strong>deprecated</strong> features:<ul> <li>The <code>compatibility</code> argument on <code>reactpy_django.components.view_to_component</code></li> <li><code>reactpy_django.components.view_to_component</code> <strong>usage as a decorator</strong></li> <li><code>reactpy_django.decorators.auth_required</code></li> <li><code>reactpy_django.REACTPY_WEBSOCKET_PATH</code></li> <li><code>settings.py:REACTPY_WEBSOCKET_URL</code></li> </ul> </li> </ul> <h2 id=400-2024-06-22><a href=https://github.com/reactive-python/reactpy-django/compare/3.8.1...4.0.0>4.0.0</a> - 2024-06-22<a class=headerlink href=#400-2024-06-22 title="Permanent link">¶</a></h2> <h3 id=added_1>Added<a class=headerlink href=#added_1 title="Permanent link">¶</a></h3> <ul> <li>Client-side Python components can now be rendered via the new <code>{% pyscript_component %}</code> template tag<ul> <li>You must first call the <code>{% pyscript_setup %}</code> template tag to load PyScript dependencies</li> </ul> </li> <li>Client-side components can be embedded into existing server-side components via <code>reactpy_django.components.pyscript_component</code>.</li> <li>Tired of writing JavaScript? You can now write PyScript code that runs directly within client browser via the <code>reactpy_django.html.pyscript</code> element.<ul> <li>This is a viable substitution for most JavaScript code.</li> </ul> </li> </ul> <h3 id=changed_3>Changed<a class=headerlink href=#changed_3 title="Permanent link">¶</a></h3> <ul> <li> <p>New syntax for <code>use_query</code> and <code>use_mutation</code> hooks. Here's a quick comparison of the changes:</p> <div class=highlight><table class=highlighttable><tr><td class=linenos><div class=linenodiv><pre><span></span><span class=normal>1</span>
5
+
--> <p class=intro> The format is based on <a href=https://keepachangelog.com/en/1.0.0/ >Keep a Changelog</a>, and this project adheres to <a href=https://semver.org/spec/v2.0.0.html>Semantic Versioning</a>. </p> <hr> <h2 id=unreleased><a href=https://github.com/reactive-python/reactpy-django/compare/5.1.0...HEAD>Unreleased</a><a class=headerlink href=#unreleased title="Permanent link">¶</a></h2> <h3 id=fixed>Fixed<a class=headerlink href=#fixed title="Permanent link">¶</a></h3> <ul> <li>Fixed regression in v5.1.0 where components would sometimes not output debug messages when <code>settings.py:DEBUG</code> is enabled.</li> </ul> <h3 id=changed>Changed<a class=headerlink href=#changed title="Permanent link">¶</a></h3> <ul> <li>Set upper limit on ReactPy version to <code><2.0.0</code>.</li> <li>ReactPy web modules are now streamed in chunks.</li> <li>ReactPy web modules are now streamed using asynchronous file reading to improve performance.</li> <li>Performed refactoring to utilize <code>ruff</code> as this repository's linter.</li> </ul> <h2 id=510-2024-11-24><a href=https://github.com/reactive-python/reactpy-django/compare/5.0.0...5.1.0>5.1.0</a> - 2024-11-24<a class=headerlink href=#510-2024-11-24 title="Permanent link">¶</a></h2> <h3 id=added>Added<a class=headerlink href=#added title="Permanent link">¶</a></h3> <ul> <li><code>settings.py:REACTPY_ASYNC_RENDERING</code> to enable asynchronous rendering of components.</li> </ul> <h3 id=changed_1>Changed<a class=headerlink href=#changed_1 title="Permanent link">¶</a></h3> <ul> <li>Bumped the minimum ReactPy version to <code>1.1.0</code>.</li> </ul> <h2 id=500-2024-10-22><a href=https://github.com/reactive-python/reactpy-django/compare/4.0.0...5.0.0>5.0.0</a> - 2024-10-22<a class=headerlink href=#500-2024-10-22 title="Permanent link">¶</a></h2> <h3 id=changed_2>Changed<a class=headerlink href=#changed_2 title="Permanent link">¶</a></h3> <ul> <li>Now using ReactPy-Router v1 for URL routing, which comes with a slightly different API than before.</li> <li>Removed dependency on <code>aiofile</code>.</li> </ul> <h3 id=removed>Removed<a class=headerlink href=#removed title="Permanent link">¶</a></h3> <ul> <li>Removed the following <strong>deprecated</strong> features:<ul> <li>The <code>compatibility</code> argument on <code>reactpy_django.components.view_to_component</code></li> <li><code>reactpy_django.components.view_to_component</code> <strong>usage as a decorator</strong></li> <li><code>reactpy_django.decorators.auth_required</code></li> <li><code>reactpy_django.REACTPY_WEBSOCKET_PATH</code></li> <li><code>settings.py:REACTPY_WEBSOCKET_URL</code></li> </ul> </li> </ul> <h2 id=400-2024-06-22><a href=https://github.com/reactive-python/reactpy-django/compare/3.8.1...4.0.0>4.0.0</a> - 2024-06-22<a class=headerlink href=#400-2024-06-22 title="Permanent link">¶</a></h2> <h3 id=added_1>Added<a class=headerlink href=#added_1 title="Permanent link">¶</a></h3> <ul> <li>Client-side Python components can now be rendered via the new <code>{% pyscript_component %}</code> template tag<ul> <li>You must first call the <code>{% pyscript_setup %}</code> template tag to load PyScript dependencies</li> </ul> </li> <li>Client-side components can be embedded into existing server-side components via <code>reactpy_django.components.pyscript_component</code>.</li> <li>Tired of writing JavaScript? You can now write PyScript code that runs directly within client browser via the <code>reactpy_django.html.pyscript</code> element.<ul> <li>This is a viable substitution for most JavaScript code.</li> </ul> </li> </ul> <h3 id=changed_3>Changed<a class=headerlink href=#changed_3 title="Permanent link">¶</a></h3> <ul> <li> <p>New syntax for <code>use_query</code> and <code>use_mutation</code> hooks. Here's a quick comparison of the changes:</p> <div class=highlight><table class=highlighttable><tr><td class=linenos><div class=linenodiv><pre><span></span><span class=normal>1</span>
</code></pre></div></td></tr></table></div></div></div></div><detailsclass=info><summary>Add <codeclass=highlight><spanclass=n>AuthMiddlewareStack</span></code> (Optional)</summary><p>There are many situations where you need to access the Django <codeclass=highlight><spanclass=n>User</span></code> or <codeclass=highlight><spanclass=n>Session</span></code> objects within ReactPy components. For example, if you want to:</p><ol><li>Access the <codeclass=highlight><spanclass=n>User</span></code> that is currently logged in</li><li>Access Django's <codeclass=highlight><spanclass=n>Session</span></code> object</li><li>Login or logout the current <codeclass=highlight><spanclass=n>User</span></code></li></ol><p>In these situations will need to ensure you are using <codeclass=highlight><spanclass=n>AuthMiddlewareStack</span></code>.</p><divclass=highlight><pre><span></span><code><spanclass=kn>from</span><spanclass=nn>channels.auth</span><spanclass=kn>import</span><spanclass=n>AuthMiddlewareStack</span><spanclass=c1># noqa: E402</span>
</code></pre></div></details><detailsclass=question><summary>Where is my <code>asgi.py</code>?</summary><p>If you do not have an <code>asgi.py</code>, follow the <ahref=https://channels.readthedocs.io/en/stable/installation.html><code>channels</code> installation guide</a>.</p></details><h2id=step-5-run-database-migrations>Step 5: Run database migrations<aclass=headerlinkhref=#step-5-run-database-migrationstitle="Permanent link">¶</a></h2><p>Run Django's <ahref=https://docs.djangoproject.com/en/stable/topics/migrations/><code>migrate</code> command</a> to initialize ReactPy-Django's database table.</p><divclass=highlight><pre><span></span><code>python<spanclass=w></span>manage.py<spanclass=w></span>migrate
73
69
</code></pre></div><h2id=step-6-check-your-configuration>Step 6: Check your configuration<aclass=headerlinkhref=#step-6-check-your-configurationtitle="Permanent link">¶</a></h2><p>Run Django's <ahref=https://docs.djangoproject.com/en/stable/ref/django-admin/#check><code>check</code> command</a> to verify if ReactPy was set up correctly.</p><divclass=highlight><pre><span></span><code>python<spanclass=w></span>manage.py<spanclass=w></span>check
74
70
</code></pre></div><h2id=step-7-create-your-first-component>Step 7: Create your first component<aclass=headerlinkhref=#step-7-create-your-first-componenttitle="Permanent link">¶</a></h2><p>The <ahref=../your-first-component/>next page</a> will show you how to create your first ReactPy component.</p><p>Prefer a quick summary? Read the <strong>At a Glance</strong> section below.</p><divclass="admonition info"><pclass=admonition-title>At a Glance</p><p><fontsize=5><strong><code>my_app/components.py</code></strong></font></p><p>You will need a file to define your <ahref=https://github.com/reactive-python/reactpy>ReactPy</a> components. We recommend creating a <code>components.py</code> file within your chosen <strong>Django app</strong> to start out. Within this file, we will create a simple <code>hello_world</code> component.</p><p><!--py-header-end--><!--py-code-start--></p><divclass=highlight><tableclass=highlighttable><tr><tdclass=linenos><divclass=linenodiv><pre><span></span><spanclass=normal>1</span>
0 commit comments