Skip to content

Conversation

@jibusayone
Copy link

In the docs, it's said that if we want the user to be routed to different views when someone requests http://example.com/ and http://customer.example.com/, we can specify that URL pattern in the PUBLIC_SCHEMA_URLCONF file.

But if we want certain views to be available only when requested from public schema, currently we have to have those patterns in both PUBLIC_SCHEMA_URLCONF and ROOT_URLCONF files. And I had to then raise django.views.defaults.page_not_found on the ROOT_URLCONF pattern.

To fix this duplicate pattern issue, I had to add set_urlconf(request.urlconf) in the middleware.

@Nicolas-Coeficiente
Copy link

i'm using django-tenants, how can i request the same commit for it?
django-tenants it's a fork of django-tenant-schemas.

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

Successfully merging this pull request may close these issues.

2 participants