39 | | ''But what if your custom template tags needs access to the HttpRequest object in order to do it's stuff? For example, if you have a menu or a breadcrumb that depends on request.path, or on the session etc? Does the DjangoContext object provide access to this in any way? The only ways I've found are things like subclassing DjangoContext and getting that to use the request to create any data needed for the base templates/custom template tags, but that won't work with generic views AFAIK. (I'm happy using my current method, as I haven't actually used generic views yet, but imagine I may need to soon). Cheers.'' |
| 39 | ''But what if your custom template tags needs access to the HttpRequest object in order to do it's stuff? For example, if you have a menu or a breadcrumb that depends on {{{request.path}}}, or on the session etc? Does the DjangoContext object provide access to this in any way? The only ways I've found are things like subclassing DjangoContext and getting that to use the request to create any data needed for the base templates/custom template tags, but that won't work with generic views AFAIK. (I'm happy using my current method, as I haven't actually used generic views yet, but imagine I may need to soon). Cheers.'' |