=== modified file 'django/contrib/admin/sites.py'
|
|
|
112 | 112 | return self.logout(request) |
113 | 113 | |
114 | 114 | if not self.has_permission(request): |
115 | | return self.login(request) |
| 115 | return self.login(request, url) |
116 | 116 | |
117 | 117 | |
118 | 118 | if url == '': |
… |
… |
|
196 | 196 | from django.contrib.auth.views import logout |
197 | 197 | return logout(request) |
198 | 198 | |
199 | | def login(self, request): |
| 199 | def login(self, request, url): |
200 | 200 | """ |
201 | 201 | Displays the login form for the given HttpRequest. |
202 | 202 | """ |
… |
… |
|
242 | 242 | # overwrite request.POST with the saved post_data, and continue |
243 | 243 | request.POST = post_data |
244 | 244 | request.user = user |
245 | | return view_func(request, *args, **kwargs) |
| 245 | return self.root(request, url) |
246 | 246 | else: |
247 | 247 | request.session.delete_test_cookie() |
248 | 248 | return http.HttpResponseRedirect(request.path) |