Hello Ivan, On Sun, Oct 08, 2006 at 05:54:27PM +0400, Ivan Sagalaev wrote: > All the extra information (such as {{ user }} or {{ LANGUAGES }}) is > passed to templates by a RequestContext that processes a number of > context processors defined in TEMPLATE_CONTEXT_PROCESSORS in settings. > > I suspect that your first template is rendered not just with t.render() > but with t.render(context) and this context _is_ a RequestContext > instance. On the contrary render_to_response doesn't use RequestContext > by default, it uses simple Context instead that doesn't know anything > about requests or context processors. To get it working for your second > template you should tell render_to_response to use ReuqestContext with > your request: > > return render_to_response( > 'template.html', > { ... }, > context_instance=RequestContext(Request) > )
Thanks much, this worked! I suspect I'll have to read more about contexts. With kind regards, Baurzhan. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---