3👍
✅
The problem was not related to localeurl, with the following view works:
return render_to_response( 'base.html', {}, context_instance = RequestContext(request))
I thought putting django.core.context_processors.request
into TEMPLATE_CONTEXT_PROCESSORS
do the job, but not.
0👍
Locale URL middleware hacks request.path I think what you’re looking for is request.path_info
0👍
In your view, when returning a response, specify the context_instance like this:
from django.shortcuts import render_to_response
from django.template.context import RequestContext
return render_to_response('base.html',{'object':object},context_instance=RequestContext(request))
- [Django]-Why Django's ModelAdmin uses lists over tuples and vice-versa
- [Django]-Django – ManyToMany as hidden fields?
- [Django]-How to manage views,urls and models on large scale in Django?
Source:stackexchange.com