Skip to content

Commit b78109f

Browse files
committed
Fix bug in Django admin login redirect
- Legacy-Id: 7096
1 parent f685e45 commit b78109f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

django/contrib/admin/sites.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ def login(self, request, extra_context=None):
314314
Displays the login form for the given HttpRequest.
315315
"""
316316
url = "/accounts/login/?next="+request.get_full_path()
317-
return http.HttpResponseRedirect(url)
317+
from django.http import HttpResponseRedirect
318+
return HttpResponseRedirect(url)
318319

319320
from django.contrib.auth.views import login
320321
context = {

0 commit comments

Comments
 (0)