Friday, April 7, 2017

Theming

Has anyone solved site-aware theming? I have a multi-tenant site (using sites framework) and I want to render custom templates for each site. My current design calls for a default design, and overrides of the base template (or child templates) for each site. Obviously, I can achieve the overrides by prepending the site/theme name when I include a template/static file. However, this does not allow for easy support of a default fall-back.

How have others solved this problem? Are you using thread.local/global variables, as I've seen in some locations?

Are there any plans to support a request/site-aware template loader?

Thanks,

Clinton

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8aaf04dc-2de7-4972-8ae5-aaaefa2bf17f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment