Code

Ticket #5801: decorators.py.diff

File decorators.py.diff, 1020 bytes (added by erny, 6 years ago)

File converted to patch rules in contrib page (.diff and relative to django root)

Line 
1Index: django/contrib/admin/views/decorators.py
2===================================================================
3--- django/contrib/admin/views/decorators.py    (revisión: 6593)
4+++ django/contrib/admin/views/decorators.py    (copia de trabajo)
5@@ -22,7 +22,7 @@
6         post_data = _encode_post_data({})
7     return render_to_response('admin/login.html', {
8         'title': _('Log in'),
9-        'app_path': request.path,
10+        'app_path': request.get_full_path(),
11         'post_data': post_data,
12         'error_message': error_message
13     }, context_instance=template.RequestContext(request))
14@@ -99,7 +99,7 @@
15                         return view_func(request, *args, **kwargs)
16                     else:
17                         request.session.delete_test_cookie()
18-                        return http.HttpResponseRedirect(request.path)
19+                        return http.HttpResponseRedirect(request.get_full_path())
20             else:
21                 return _display_login_form(request, ERROR_MESSAGE)
22