Thursday, 12 September 2013

Does Django 1.5 come with a default logout view?

Does Django 1.5 come with a default logout view?

Django seems to come with a prebuilt login view implementation:
url(r'^accounts/login/$', 'django.contrib.auth.views.login'),
which populates a template, by default located at registration/login.html.
Is there a symmetric implementation of logout? Can I write something like
url(r'^accounts/logout/$', 'django.contrib.auth.views.logout'),
and implement a template at registration/logout.html?

No comments:

Post a Comment