Skip to content

Use Django database router API #162

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

Merged
merged 14 commits into from
Aug 4, 2023

Conversation

Archmonger
Copy link
Contributor

@Archmonger Archmonger commented Jul 9, 2023

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

Description

By default, all databases registered within Django are configured with identical columns. There may be some edge cases (#152) where this can be problematic. In order to to stop ComponentSession from existing on databases other than the user configured REACTPY_DATABASE, we need to create a Database Router.

Changelog

  • reactpy_django.database.Router must now be registered in settings.py:DATABASE_ROUTERS whenever settings.py:REACTPY_DATABASE is set.
  • Added system checks for a variety of common ReactPy misconfiguration

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 Archmonger marked this pull request as ready for review July 9, 2023 06:08
@Archmonger Archmonger requested a review from a team as a code owner July 9, 2023 06:08
@rmorshea
Copy link
Contributor

rmorshea commented Jul 9, 2023

@numpde would you be willing to help review this? I'm just not familiar enough with Django to understand the details here. I can cover a high-level review though.

@Archmonger
Copy link
Contributor Author

I'd like to get these system checks out ASAP, so I will merge this. If you decide to provide a post-merge review I will incorporate any changes in a follow up PR.

@Archmonger Archmonger merged commit 01946d5 into reactive-python:main Aug 4, 2023
@Archmonger Archmonger deleted the dj-db-routing branch August 4, 2023 07:26
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.

2 participants