S
S
Sergey Nizhny Novgorod2016-08-29 15:31:11
Django
Sergey Nizhny Novgorod, 2016-08-29 15:31:11

Do I need to replace django.core.context_processors?

Hello.
I'm testing django and the following message appears (I have django 1.9.2):
"django.core.context_processors is deprecated in favor of django.template.context_processors"
As a result, if I change in

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'templates')]
        ,
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
                # 'django.core.context_processors.request', - убираю старый
                'django.template.context_processors' - ставлю новый
            ],
        },
    },
]

When run with replacement, an error appears: "TypeError at" / and "'module' object is not callable". And nothing works. If I return, then it plows.
What could be the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question