Ticket #6656: error2.diff

File error2.diff, 1.1 KB (added by Purdea Andrei, 17 years ago)
  • django/contrib/admin/sites.py

     
    113113            return self.logout(request)
    114114
    115115        if not self.has_permission(request):
    116             return self.login(request)
     116            return self.login(request, url)
    117117
    118118
    119119        if url == '':
     
    197197        from django.contrib.auth.views import logout
    198198        return logout(request)
    199199
    200     def login(self, request):
     200    def login(self, request, url):
    201201        """
    202202        Displays the login form for the given HttpRequest.
    203203        """
     
    245245                        # overwrite request.POST with the saved post_data, and continue
    246246                        request.POST = post_data
    247247                        request.user = user
    248                         return view_func(request, *args, **kwargs)
     248                        return self.root(request, url)
    249249                    else:
    250250                        request.session.delete_test_cookie()
    251251                        return http.HttpResponseRedirect(request.path)
Back to Top