I am new to Django, and I am trying to put the logout to work... I have installed the an App called, Django-Registration.
My problem is that I can do the logout, but the page does not get refreshed, I must to press F5 after the logout to see the page for not logged users. What I have done is the following: urls.py, added to urlpatterns: [code] url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='auth_logout'), url(r'^logout/(?P<next_page>.*)/$', 'django.contrib.auth.views.logout', name='auth_logout_next'), [/code] In the template I have this code: [code] {% if request.user.is_authenticated %} <p>Welcome {{ request.user.username }}. <a href="{% url auth_logout_next 'directorio' %}">Logout</a></p> {% else %} <p>Welcome. Please <a href="/accounts/login/">login</a> or <a href="/accounts/register/">register</a></p> {% endif %} [/code] When I click Logout I dont see this in the screen: [code] <p>Welcome. Please <a href="/accounts/login/">login</a> or <a href="/accounts/register/">register</a></p> [/code] I only see this text if I use F5 to refresh the page. What I am missing here? Please give me a clue. Best Regards, -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.