Skip to content

Retrieve tenent object once per request #45

Description

@henriquebastos

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions