diff options
| author | hui shang <shangdahao@gmail.com> | 2017-08-24 21:11:16 +0800 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-08-24 09:11:16 -0400 |
| commit | c0f4c60edd429f5ef57241cfabd159d13e26e5ac (patch) | |
| tree | 484eaaf788dd9cbda8c37cbdf59a95ca3d6c87f2 /django | |
| parent | da0fb5b1ec89a747459ab64482f3202cb452c068 (diff) | |
Fixed #28513 -- Added POST request support to LogoutView.
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/auth/views.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/django/contrib/auth/views.py b/django/contrib/auth/views.py index fd756e33f2..7791d9a7fd 100644 --- a/django/contrib/auth/views.py +++ b/django/contrib/auth/views.py @@ -133,6 +133,10 @@ class LogoutView(SuccessURLAllowedHostsMixin, TemplateView): return HttpResponseRedirect(next_page) return super().dispatch(request, *args, **kwargs) + def post(self, request, *args, **kwargs): + """Logout may be done via POST.""" + return self.get(request, *args, **kwargs) + def get_next_page(self): if self.next_page is not None: next_page = resolve_url(self.next_page) |
