Skip to content Skip to sidebar Skip to footer

Importerror: Cannot Import Name 'template_context_processors'

I tried to use django-endless-pagination https://django-endless-pagination.readthedocs.io/en/latest/start.html#quickstart And I follow tutorial I wrote: from django.conf.global_s

Solution 1:

The docs of endless pagination are not updated. TEMPLATE_CONTEXT_PROCESSORS was deprecated as of Django 1.8 and removed in 1.10. Please refer to upgrade https://docs.djangoproject.com/en/1.10/ref/templates/upgrading/, it shows where to place context processors.

Solution 2:

Those instructions are written for Django 1.7 or earlier.

They have not been updated for the new TEMPLATES setting in Django 1.8, and will not work in Django 1.10+.

For this particular part of the instructions, removing those lines from your settings.py should be enough, because the request template context processor is enabled by default in Django 1.8+.

However, it looks as if django-endless-pagination is no longer supported so you might have other problems using it with recent versions of Django. You could try this fork instead.

Post a Comment for "Importerror: Cannot Import Name 'template_context_processors'"