Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #145 -- Changed admin logout to use views.auth.login.logout, wh…

…ich 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
  • Loading branch information...
commit dbfb35b54225b7f3cf188ea6dba143a589924a0f 1 parent 9c3c0be
@adrianholovaty adrianholovaty authored
View
0  django/conf/admin_templates/logged_out.html → ...conf/admin_templates/registration/logged_out.html
File renamed without changes
View
2  django/conf/urls/admin.py
@@ -3,7 +3,7 @@
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'),
View
8 django/views/admin/main.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.