2👍
✅
Your video_detail
URL pattern matches /logout/
. Django stops as soon as it finds a match, so requests for /logout/
will be handled by the std_video_detail_view
view instead of the user_logout
view.
You can fix this by either changing the regex for the video_detail
URL so that it doesn’t clash (for example you could use ^videos/(?P<video_key>[a-zA-Z0-9\_\.]+)/$
), or by moving the logout URL pattern above the video detail pattern.
Source:stackexchange.com