javrasya / django-river

Django workflow library that supports on the fly changes ⛵
BSD 3-Clause "New" or "Revised" License
740 stars 105 forks source link

[Question] How to incorporate multi-tenancy with django river? #185

Open shubham-pyc opened 3 years ago

shubham-pyc commented 3 years ago

I am creating a django webapp which will be used by multiple organizations. I am using https://github.com/citusdata/django-multitenant library which helps in isolation of the tenant's data. Is there a way to change the existing workflow model so that I can have a foreign key related to a tenant model?

for example:

class Contract(TentantModel):
        tentant = models.ForiegnKey(Tenant)
        state = StateField()`

so that the tenant foreign key and state can be unique (combined)