M
M
maddread2016-01-25 08:05:41
Django
maddread, 2016-01-25 08:05:41

How to remove deprecated messages in Django?

Version Django 1.9, this warning appears on startup:
RemovedInDjango110Warning: Reversing by dotted path is deprecated (django.contrib.auth.views.logout)
I have this line in my urls.py to exit the application.
How to get rid of the message, what to replace this piece of code with?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey K, 2016-01-25
@maddread

from django.contrib.auth.views import logout
urlpatterns = [
    ...
    url(r'^accounts/logout/$', logout), 
    ...
]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question