Two things:

1) make sure the context processor is installed in your settings file.
2) context processors should return dicts.  Try:

def swiss_context_processors(request):
    added_context = { 'mytest': 'aaa', }
    return added_context

On Jan 5, 12:03 pm, Guy Nesher <[email protected]> wrote:
> Hi,
>
> I've created a simple context processor which simply returns a
> variable, however I'm unable to retrieve it from my template.
>
> The context processor is quite simple :
>
> def swiss_context_processors(request):
>     mytest = "aaa"
>     return mytest
>
> and I am calling the context processor in my view :
>
> def index(request):
>     return render_to_response('front/
> index.html',context_instance=RequestContext(request)
>     )
>
> However when I try to access the variable in my template {{mytest}} it
> returns empty.
>
> What am I missing ?

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