-
Notifications
You must be signed in to change notification settings - Fork 342
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
Specializing static and media based on tenants #108
Conversation
Nice addition, but... From my personal story :) Using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you I will look an merge later
Thank you for your considerations. I followed the same idea of what already existed for the templates based on tenants, so I used schema_name, but later, we can put a flag in the settings where we can choose between using ID or schema_name, as you said :). Thanks |
@@ -26,7 +32,9 @@ def process_request(self, request): | |||
domain = get_object_or_404(get_tenant_domain_model().objects.select_related('tenant'), | |||
domain=hostname) | |||
|
|||
domain.tenant.domain_url = hostname |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mateuspadua Is this line needed as i don't think it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont add the line 35, this line already existed, see here. :)
https://github.com/tomturner/django-tenants/blob/master/django_tenants/middleware.py
I searched here and saw that line was added in this commit 7020e63
Is about this line your question?
Hi @tomturner, i'm here if you need any help to merge my pull request. Thanks |
@mateuspadua Thank you I will try and merge over the weekend |
@tomturner thanks for merge, i believe that it is going to help many people. :) |
New Feature to be possible have different static files for each tenant or upload media files to separate directories for each tenant. More information, please read the documentation on this commit. :)