0

This is what i get in my terminal when i start the server locally:

Required context processor django_facebook.context_processors.facebook wasnt found
Required context processor django.core.context_processors.request wasnt found
/Users/iam-tony/.envs/party_project/lib/python3.4/importlib/_bootstrap.py:321: RemovedInDjango19Warning: The django.forms.util module has been renamed. Use django.forms.utils instead.
  return f(*args, **kwds)

But Here are my settings and both context_processors are there:

    TEMPLATES = [
    {
        # See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-BACKEND
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
        'DIRS': [
            str(APPS_DIR.path('templates')),
        ],
        'OPTIONS': {
            # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
            'debug': DEBUG,
            # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders
            # https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types
            'loaders': [
                'django.template.loaders.filesystem.Loader',
                'django.template.loaders.app_directories.Loader',
            ],
            # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.template.context_processors.i18n',
                'django.template.context_processors.media',
                'django.template.context_processors.static',
                'django.template.context_processors.tz',
                'django.contrib.messages.context_processors.messages',
                # Your stuff: custom template context processors go here
                #django_facebook context procesor:
                'django_facebook.context_processors.facebook',
            ],
        },
    },
]

I am using cookiecutter and Django1.8. I've been on this for a few days now but I can't seem to find a similar post about it.

Tony
  • 2,382
  • 7
  • 32
  • 51

1 Answers1

0

If you look at the django-facebook code, it is out of date

# make sure the context processors are present
required = ['django_facebook.context_processors.facebook',
            'django.core.context_processors.request']
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)

It's checking the old setting, setting.TEMPLATE_CONTEXT_PROCESSORS which was used for Django < 1.8, instead of the new context_processors option.

There's an issue on the projects GitHub repository about this. Until it is fixed, it's only a warning, so you are safe to ignore it.

Alasdair
  • 298,606
  • 55
  • 578
  • 516
  • It is but when I am using it I get the debug page saying that it need the context processor. – Tony Nov 04 '15 at 17:54
  • Can you add a screenshot of the debug page? You might want to reconsider whether you want to rely on a project that doesn't support Django 1.8, six months after it has been released. If django-facebook doesn't work with Django 1.8, then Stack Overflow can't help you. – Alasdair Nov 04 '15 at 17:58