Re: Confused about thread locals... again.

2010-12-16 Thread Doug Ballance
@ringemip Thanks for the reply. I've been considering something like that, but given the number of views and tags involved, it would be a very long process. Especially since I used a new context instance in most of my custom tags that render another template, rather the pushing, rendering, poping

Re: Confused about thread locals... again.

2010-12-15 Thread ringemup
I faced this problem, and ran into the issue that the request object is not passed to the template loader, so there's no way to get your domain from within a custom template loader without using threadlocals. What I did instead was as follows: 1) Write a custom render-to-response type function t

Re: Confused about thread locals... again.

2010-12-15 Thread W. Craig Trader
I think that the correct solution for your problem would be, instead of hacking around with the template path on the fly like this, to instead write a template loader for your application, and apply the logic you need within the template loader itself. See: http://docs.djangoproject.com/en/dev/ref

Confused about thread locals... again.

2010-12-15 Thread Doug Ballance
First, I'd like to find out if there is a better way than thread locals to do what I want to do. From what I can tell, it isn't possible any other way. Finally, I don't understand why my thread locals implementation/hack works - which scares me, so I would like to ask the wiser gurus out there f