Skip to content

Ziafazal/304: Multi-tenant/multi-site support in Comprehensive Theming - #11480

Closed
ziafazal wants to merge 2 commits into
masterfrom
ziafazal/304-b
Closed

Ziafazal/304: Multi-tenant/multi-site support in Comprehensive Theming#11480
ziafazal wants to merge 2 commits into
masterfrom
ziafazal/304-b

Conversation

@ziafazal

@ziafazal ziafazal commented Feb 9, 2016

Copy link
Copy Markdown
Contributor

@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.

@mattdrayer

Copy link
Copy Markdown
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():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static file lookups will be handled custom ComprehensiveThemeFinder, do we still need to add theme staticfile dirs to STATICFILES_DIRS?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each theme is added to STATICFILES_DIRS since collectstatic would not run in request/response cycle and we would not know current site.

@mattdrayer

Copy link
Copy Markdown
Contributor

@ziafazal, can we close this exploratory PR, or are there aspects of it that you would like to keep? Does #11613 address all of the functionality covered by this changeset?

@ziafazal

Copy link
Copy Markdown
Contributor Author

@mattdrayer yeah almost all of the required stuff has been moved to PR #11613. Closing this one.

@ziafazal ziafazal closed this Feb 23, 2016
@benpatterson
benpatterson deleted the ziafazal/304-b branch August 2, 2016 13:07
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.

3 participants