django-multitenant
django-multitenant copied to clipboard
Python/Django support for distributed multi-tenant databases like Postgres+Citus
Hey, With the current version of django-multitenant, we are having problems with using classes with the mixin in migrations. Basically, the issue is that __set_attr__ does not play well with...
``` class Product_ViewSet(viewsets.ModelViewSet): serializer_class = Product_serializers permission_classes = (IsAuthenticated,) authentication_classes = (JSONWebTokenAuthentication, ) # this def get_queryset(self): return Product.objects.all() ``` ``` class MultitenantMiddleware: def __init__(self, get_response): self.get_response = get_response def...
Minor changes to allow use of PostGIS rather than vanilla Postgres
The WHERE clause generated is just like`WHERE id IN (...)` `prefetch_related` with the `Prefetch` object works: ``` prefetch_related( Prefetch('field', Model.objects.all()) ) ``` This workaround sometimes helps, but, for example, it...
Anyway you guys can port this for use with FastAPI with SQLAlchemy? I could surely use it.
In the documentation https://github.com/citusdata/django-multitenant#automating-composite-foreign-keys-at-db-layer it's said that the `django.backends.postgresql could be replaced with `django_multitenant.backends.postgresql` in `ENGINE` in `settings.py. But when I do this and run the server, I get the...
in my application I use PostGIS extension with `django.contrib.gis.db.backends.postgis` engine , that's ok to use `django_multitenant.backends.postgresql` just when I want to migrate?
Hi! First off, thank you for building this library, we were quite excited to get started using it, however, we've run into an issue. **Issue descripion** We have our models...
I have the model design below. Here is the logic at the heart of my question: - teams can access "marketplace" courses that are available to all teams - teams...