I have what I think is a common issue, but I have not seen a good solution. I have tried various workarounds and got nowhere. So, here what I would like to do and the problem I run into.
I want to have a template loader that looks for templates based upon a user's current "site_profile", which is basically a version of what site they are on. So I need the loader to look in: templates/site_profile_name/template.html and return a 404 if it doesn't exist. Someone earlier had linked to http://www.b-list.org/weblog/2007/nov/01/django-tips-template-loading-and-rendering/ but none of these really apply as they are at the view level and this is not practical as I would need to make each and every view do a select_template() for the site_profile string. A template loader seems like a much more DRY approach. However I have to admit that, despite hours of staring, I find the template loader code a little baffling. The Django docs make a reference (in not recommending the threads_local method) to calling a method/function that has access to Request. But what would that be? I'm clearly not making some important connection. Thanks for any insight. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.