reactive-python / reactpy-django

It's React, but in Python. Now with Django integration.
https://reactive-python.github.io/reactpy-django/
MIT License
322 stars 18 forks source link

Use Django database router API #162

Closed Archmonger closed 1 year ago

Archmonger commented 1 year ago

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

Checklist:

Please update this checklist as you complete each item:

rmorshea commented 1 year ago

@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 commented 1 year ago

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.