summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_views.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2022-04-16 19:36:59 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-04-20 10:04:29 +0200
commit5fcd9b8c3383e2ab20c1573b44131105654b99d0 (patch)
treea8f8cb9c775436c6243e78d9c216855b5cadfe6a /tests/auth_tests/test_views.py
parent5b8699e723d9daf373fff46c6859fed2b780a9bd (diff)
Unified LoginView/LogoutView.get_default_redirect_url() methods.
This might change the behavior when self.next_page == "". However, resolve_url(self.next_page) would almost certainly fail in that case. It is technically possible to define a logout URLpattern whose name is "": path('logout/', LogoutView.as_view(), name=''), and then to refer to this pattern with next_page = "". However this feels like a pathological case, so we decided not to handle it. Most checks on next_page, LOGIN_REDIRECT_URL, and LOGOUT_REDIRECT_URL are performed with boolean evaluation rather than comparison with None. That's why we standardizing that way.
Diffstat (limited to 'tests/auth_tests/test_views.py')
0 files changed, 0 insertions, 0 deletions