mirror of https://github.com/django/django.git
Fixed #145 -- Changed admin logout to use views.auth.login.logout, which uses redirects to ensure cookies aren't stale. Thanks, sdelatorre@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@287 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9c3c0bed33
commit
dbfb35b542
|
@ -3,7 +3,7 @@ from django.conf.settings import INSTALLED_APPS
|
|||
|
||||
urlpatterns = (
|
||||
('^/?$', 'django.views.admin.main.index'),
|
||||
('^logout/$', 'django.views.admin.main.logout'),
|
||||
('^logout/$', 'django.views.auth.login.logout'),
|
||||
('^password_change/$', 'django.views.registration.passwords.password_change'),
|
||||
('^password_change/done/$', 'django.views.registration.passwords.password_change_done'),
|
||||
('^template_validator/$', 'django.views.admin.template.template_validator'),
|
||||
|
|
|
@ -50,14 +50,6 @@ def index(request):
|
|||
c = Context(request, {'title': 'Site administration'})
|
||||
return HttpResponse(t.render(c))
|
||||
|
||||
def logout(request):
|
||||
request.session.delete()
|
||||
t = template_loader.get_template('logged_out')
|
||||
c = Context(request, {
|
||||
'title': "You're logged out",
|
||||
})
|
||||
return HttpResponse(t.render(c))
|
||||
|
||||
def change_list(request, app_label, module_name):
|
||||
from django.core import paginator
|
||||
from django.utils import dateformat
|
||||
|
|
Loading…
Reference in New Issue