Remove the LOGOUT_REDIRECT_URL from the settings That should solve the problem
On Thu, Feb 22, 2024, 3:02 PM Okechukwu Ogo <[email protected]> wrote: > Check your logout URL and view if there's a mistake > > On Thu, 22 Feb 2024, 14:27 AshiQul Islam Munna, <[email protected]> > wrote: > >> Hello! >> >> I am using default auth system in my project these steps- >> >> 1. Add this in my project urls path("accounts/", include( >> "django.contrib.auth.urls")), >> >> 2. Create HTML file in -'templates/registration/login.html' >> >> 3. In 'base.html' i wrote - >> ' {% if user.is_authenticated %} >> <p>Hi {{ user.username }}!</p> >> <p><a href="{% url 'logout' %}">Log out</a></p> >> {% else %} >> <p>You are not logged in.</p> >> <a href="{% url 'login' %}">Log In</a> >> {% endif %} >> ' >> >> 4. And finally in 'setting.py' set >> LOGIN_REDIRECT_URL = "home" >> LOGOUT_REDIRECT_URL = "home" >> >> That's ALL! >> ' LOGIN ' works perfectly but "LOGOUT " not working. It say's- >> [image: Screenshot_96.png] >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/c94cea9b-59be-41f3-ae1b-2a7c64156e8fn%40googlegroups.com >> <https://groups.google.com/d/msgid/django-users/c94cea9b-59be-41f3-ae1b-2a7c64156e8fn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAMeYHes6XEoGcHAgLQqgXMPLwkU9dh%2BbV3k0vPcVGU8MEAZGuw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAMeYHes6XEoGcHAgLQqgXMPLwkU9dh%2BbV3k0vPcVGU8MEAZGuw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF0%2B-3nghV_jj93v7yHwFuUKp4hfFDjMCNMUyWR1AyZbie6NxA%40mail.gmail.com.

