Originally created by: troygrosfield
Receiving the following warning which shouldn't be there in django 1.8:
Required context processor django_facebook.context_processors.facebook wasnt found
The TEMPLATE_CONTEXT_PROCESSORS setting is deprecated starting in django 1.8:
It was replaced in favor of a TEMPLATES setting where the dict needs to have context_processors defined as an options key:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(SITE_ROOT, 'templates')],
'OPTIONS': {
'context_processors': [
'django.core.context_processors.request',
'django.core.context_processors.media',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django_facebook.context_processors.facebook',
]
},
},
]
This line of code [1] is what needs to change:
context_processors = settings.TEMPLATE_CONTEXT_PROCESSORS
for context_processor in required:
if context_processor not in context_processors:
logger.warn(
'Required context processor %s wasnt found', context_processor)
Originally posted by: javipalanca
For me worked to comment lines 39-41 in views.py:
# validation to ensure the context processor is enabledif not context.get('FACEBOOK_APP_ID'):message = 'Please specify a Facebook app id and ensure the context processor is enabled'raise ValueError(message)Originally posted by: jrabbit
This seems to be resolved by [#549] so master seems to work
Related
Tickets:
#549Originally posted by: Blutude
I can't use this package on Django=2.0.7 because of that error. Any idea how to fix this?