Hi!
 You can use RequestContext (and also middlewares and context processor).
Just pass it to jinja2 render method like this
template.render(**context)

See this blog post:
http://lethain.com/entry/2008/jul/22/replacing-django-s-template-language-with-jinja2/



On Sun, Oct 4, 2009 at 2:36 AM, John Wang <john.wang...@gmail.com> wrote:

>
> Hi all,
>
> I want to use Jinja2 in a django project but keep some features
> django, e.g, middleware and context processor.
>
> My question is, can I still use middleware and contextprocess in
> django when replace it template with Jinja2 ?
>
> BTW, what most i like jinja2 is that i can define macros in it which
> allow DRY in template. i am a newbie to Django , if django template
> can archive the same,please point out. I know i can write custom tag
> in django, but i dont like to bother python programming when need some
> reusable block of template.
>
> Many thanks.
>
> John.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to