Ticket #5999: 00-admin-expired-session.diff

File 00-admin-expired-session.diff, 1.1 KB (added by Petr Marhoun <petr.marhoun@…>, 17 years ago)
  • django/contrib/admin/sites.py

    === modified file 'django/contrib/admin/sites.py'
     
    112112            return self.logout(request)
    113113
    114114        if not self.has_permission(request):
    115             return self.login(request)
     115            return self.login(request, url)
    116116
    117117
    118118        if url == '':
     
    196196        from django.contrib.auth.views import logout
    197197        return logout(request)
    198198
    199     def login(self, request):
     199    def login(self, request, url):
    200200        """
    201201        Displays the login form for the given HttpRequest.
    202202        """
     
    242242                        # overwrite request.POST with the saved post_data, and continue
    243243                        request.POST = post_data
    244244                        request.user = user
    245                         return view_func(request, *args, **kwargs)
     245                        return self.root(request, url)
    246246                    else:
    247247                        request.session.delete_test_cookie()
    248248                        return http.HttpResponseRedirect(request.path)
Back to Top