U
U
undeadter2016-12-17 22:32:40
Django
undeadter, 2016-12-17 22:32:40

How to get rid of an error in Django?

How to get rid of this error:

WARNINGS:
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values ​​of the following settings into your default TEMPLATES dict: TEMPLATE_LOADERS.

in settings.py this is:
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',
            ],
        },
    },
]

TEMPLATE_LOADERS = [
    'django_jinja.loaders.AppLoader',
    'django_jinja.loaders.FileSystemLoader',
]

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
tema_sun, 2016-12-18
@undeadter

Let me read the post for you - you need to move TEMPLATE_LOADERS to TEMPLATES .

I
Ilya, 2016-12-17
@FireGM

https://docs.djangoproject.com/en/1.10/ref/templat...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question