Re: Proposal: Add current_app to request and pass it to template loaders.

2013-06-13 Thread digi604
Was there any movement in this regard? On Monday, March 28, 2011 2:11:42 PM UTC+2, Tai Lee wrote: > > On Mar 28, 4:08 pm, Justin Holmes wrote: > > By "current app," do you mean the app which contains the view to which > > the current URL is mapped? > > I mean the "namespace" (instance name) fo

Re: Proposal: Add current_app to request and pass it to template loaders.

2011-03-28 Thread Tai Lee
On Mar 28, 4:08 pm, Justin Holmes wrote: > By "current app," do you mean the app which contains the view to which > the current URL is mapped? I mean the "namespace" (instance name) for the requested URL or the "current_app" attribute of a context object which is supposed to be used as a hint for

Re: Proposal: Add current_app to request and pass it to template loaders.

2011-03-28 Thread Justin Holmes
By "current app," do you mean the app which contains the view to which the current URL is mapped? On Mon, Mar 28, 2011 at 12:39 AM, Tai Lee wrote: > Now that 1.3 is out, does any core dev have an opinion, feedback or > suggestions on this? > > I've solved my immediate need with two template loade

Re: Proposal: Add current_app to request and pass it to template loaders.

2011-03-27 Thread Tai Lee
Now that 1.3 is out, does any core dev have an opinion, feedback or suggestions on this? I've solved my immediate need with two template loaders (subclasses of the app_directories loader) that use thread locals. One prefixes the requested template name with the app name and the other prefixes it w

Re: Proposal: Add current_app to request and pass it to template loaders.

2011-03-11 Thread Dan Fairs
Some tags you could potentially add 'hidden' values like __theme__ in the context using RequestContext and then have the tags pass those on to get_template(). Assuming tags played nicely and always passed along those values to their nodelists contexts. Other tags like {% include "app/sometemplate

Re: Proposal: Add current_app to request and pass it to template loaders.

2011-03-10 Thread Doug Ballance
I too would very much like a request aware template loader. For my project the threadlocals approach was the only way I could find to meet my requirements of a site-based template structure (project has multitenancy) and user selectable template 'themes'. I've tried looking at the django source t

Proposal: Add current_app to request and pass it to template loaders.

2011-03-09 Thread Tai Lee
I have a generic app which includes base templates (for HTML documents, emails, etc.) and also template tags that render a template (for form fields, pagination forms/links, filter forms/links, etc.) Sometimes I have a project that has several other apps installed which both use the base template