[Answered ]-Django can't resolve a url name

2👍

Well guys, found the problem.
when using “reverse” I forgot to add the app’s name.
So the following did the trick.

Instead of:

return HttpResponseRedirect(reverse('login'), {'logged_out_success_message': user.username + " logged out successfully"})

I wrote (adding ‘bz:’ as a prefix):

return HttpResponseRedirect(reverse('bz:login'), {'logged_out_success_message': user.username + " logged out successfully"})

And now it works.
Thank you.

Leave a comment