Ziafazal/304: Multi-tenant/multi-site support in Comprehensive Theming - #11480
Closed
ziafazal wants to merge 2 commits into
Closed
Ziafazal/304: Multi-tenant/multi-site support in Comprehensive Theming#11480ziafazal wants to merge 2 commits into
ziafazal wants to merge 2 commits into
Conversation
Contributor
|
@douglashall FYI |
| Overridden method which will hand-off the template lookup to the microsite subsystem | ||
| """ | ||
| microsite_template = microsite.get_template(uri) | ||
| if microsite.is_request_in_microsite(): |
Contributor
There was a problem hiding this comment.
These microsite references should be routed through the theming app -- the goal of this work is two-fold: to support multiple sites with comprehensive theming and eliminate the existing microsites implementation.
| for theme_dir in os.listdir(themes_dir): | ||
| staticfiles_dir = os.path.join(themes_dir, theme_dir, root_name, "static") | ||
| if staticfiles_dir.isdir(): | ||
| changes['settings']['STATICFILES_DIRS'] = settings.STATICFILES_DIRS + [staticfiles_dir] |
Contributor
There was a problem hiding this comment.
Static file lookups will be handled custom ComprehensiveThemeFinder, do we still need to add theme staticfile dirs to STATICFILES_DIRS?
Contributor
Author
There was a problem hiding this comment.
Each theme is added to STATICFILES_DIRS since collectstatic would not run in request/response cycle and we would not know current site.
Contributor
Contributor
Author
|
@mattdrayer yeah almost all of the required stuff has been moved to PR #11613. Closing this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@mattdrayer this PR has demo code to support multiple comprehensive themes as described in the discovery document here. It definitely needs some fine tuning but i just wanted demonstrate the idea.
https://openedx.atlassian.net/wiki/display/SOL/DISC%3A+Possible+approach+to+support+multiple+themes+via+Comprehensive+Theming
@mtyaka @nedbat FYI.