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

Retrieve tenent object once per request #45

Open
henriquebastos opened this issue Sep 21, 2022 · 0 comments
Open

Retrieve tenent object once per request #45

henriquebastos opened this issue Sep 21, 2022 · 0 comments

Comments

@henriquebastos
Copy link
Contributor

Today we are selecting the tenant instance for every TenantAware model save.

Ideally, we should retrieve the Tenant instance on the middleware, but then there is no easy way to make the middlewares know the Tenant model name.

  1. One idea is to inject a default value as a class attribute on the TenantLocal class. But we still need to check it.

  2. Another idea is to fallback and creates a settings parameter that explicitly defines the Tenant Model Class name like myapp.MyTenant.

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

No branches or pull requests

1 participant