Changes between Version 6 and Version 7 of TemplatePitfalls


Ignore:
Timestamp:
Sep 13, 2005, 7:41:25 AM (19 years ago)
Author:
L.Plant.98@…
Comment:

question

Legend:

Unmodified
Added
Removed
Modified
  • TemplatePitfalls

    v6 v7  
    3838
    3939{{{- garthk}}}
     40
     41''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.''
     42
Back to Top