Brian Morton wrote:
 > Also, do you have django.core.context_processors.request in your
 > context_processors?  It looks like you're trying to overwrite a dict
 > element that already exists.

# settings.py

TEMPLATE_CONTEXT_PROCESSORS = (
     'django.core.context_processors.auth',
     'django.core.context_processors.debug',
     'django.core.context_processors.i18n',
     'pysplice.splice.context_processors.context_vars',
)


# pysplice/splice/context_processors/context_vars.py

from django.conf import settings

def context_vars(request):
     return {'base_url': settings.BASE_URL,
             'media_url': settings.MEDIA_URL,
             'media_url2': settings.MEDIA_URL2,
             'gmap_key': settings.GOOGLE_API_KEY,
             'sidebar': None,
             'request': request}


And, I'm obviously using context_instance=RequestContext(request) where 
needed.

As said, the weird thing is that it SPORADICLY fails, not all the time. 
I.e. it only fails once every X views. Could this possibly have 
something to do with the anonymous user caching?


  - Bram

> 
> On Sep 6, 12:14 pm, Bram - Smartelectronix <[EMAIL PROTECTED]>
> wrote:
>> Hello Everyone,
>>
>> I have a request context which sets {'request':request}...
>>
>> On windows (dev-server) everything is fine and dandy, but on our live
>> site (splicemusic.com, Apache2 + mod_python) I see *sporadic*
>> appearances of:
>>
>> "VariableDoesNotExist: Failed lookup for key [request] in [{}]"
>>
>> Does anyone have any idea what this could mean? The strange part is that
>> the same page will sometimes trigger the error and sometimes... not!
>>
>>   - bram
> 
> 
> > 


--~--~---------~--~----~------------~-------~--~----~
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