Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to modify component's host URLs #172

Merged
merged 24 commits into from
Aug 18, 2023

Conversation

Archmonger
Copy link
Contributor

@Archmonger Archmonger commented Aug 17, 2023

By submitting this pull request you agree that all contributions to this project are made under the MIT license.

Description

Added

  • Distributed Computing: ReactPy components can now optionally be rendered by a completely separate server!
    • REACTPY_DEFAULT_HOSTS setting can round-robin a list of ReactPy rendering hosts.
    • host argument has been added to the component template tag to force components to render on a specific host.
  • reactpy_django.utils.register_component function to manually register root components.
    • Useful if you have dedicated ReactPy rendering application(s) that do not use HTML templates.

Changed

  • ReactPy will now provide a warning if your HTTP URLs are not on the same prefix as your websockets.
  • Cleaner logging output for detected ReactPy root components.

Deprecated

  • reactpy_django.REACTPY_WEBSOCKET_PATH is deprecated. The similar replacement is REACTPY_WEBSOCKET_ROUTE.
  • settings.py:REACTPY_WEBSOCKET_URL is deprecated. The similar replacement is REACTPY_URL_PREFIX.

Removed

  • Warning W007 (REACTPY_WEBSOCKET_URL doesn't end with a slash) has been removed. ReactPy now automatically handles slashes.
  • Warning W008 (REACTPY_WEBSOCKET_URL doesn't start with an alphanumeric character) has been removed. ReactPy now automatically handles this scenario.
  • Error E009 (channels is not in settings.py:INSTALLED_APPS) has been removed. Newer versions of channels do not require installation via INSTALLED_APPS to receive an ASGI webserver.

Checklist:

Please update this checklist as you complete each item:

  • Tests have been included for all bug fixes or added functionality.
  • The changelog has been updated with any significant changes, if necessary.
  • GitHub Issues which may be closed by this PR have been linked.

@Archmonger
Copy link
Contributor Author

Archmonger commented Aug 17, 2023

@rmorshea This PR means reactpy-django officially supports distributed computing. Way more scalable architecture, so I'm interested to see if anyone will use it for deployment.

@Archmonger Archmonger marked this pull request as ready for review August 17, 2023 10:48
@Archmonger Archmonger requested a review from a team as a code owner August 17, 2023 10:48
@Archmonger Archmonger merged commit 41641aa into reactive-python:main Aug 18, 2023
7 checks passed
@Archmonger Archmonger deleted the host-url-configuration branch August 18, 2023 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant