On 6/3/07, Evan H. Carmi <[EMAIL PROTECTED]> wrote:
> I don't know how to pass the context processor with HttpResponse so my
> template can do the ifequal. If someone can send me in the right
> direction it would be glorious.

Have a look at the documentation, which covers the fact that you need
to use a slightly different Context class to have context processors
automatically applied:

http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext

You'll want to import RequestContext, and do something like

c = RequestContext(request, { 'posts': entreis })

Or import the render_to_response shortcut as well and do it like so:

return render_to_response('blog/blog_list.html', { 'posts': entries },
context_instance=RequestContext(request))

Also, note that Django includes a context processor which adds the
HttpRequest object to any RequestContext it's used in, so adding
'django.core.context_processors.request' to your
TEMPLATE_CONTEXT_PROCESSORS setting will get that for you
automatically; then, in a template, you could use {{ request.path }}
to get the path.

-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to