Skip to content

Commit

Permalink
Default to "/accounts/logout/" rather than settings.LOGOUT_URL (#646)
Browse files Browse the repository at this point in the history
settings.LOGOUT_URL hasn't been included in Django since Django 1.10,
and hasn't functioned since pre-1.0.

The default of "/accounts/logout/" corresponds to most examples in the
documentation, and is more likely to work out of the box than the
present default of `None`.

See django/django@59f861f
  • Loading branch information
vanschelven committed Oct 25, 2020
1 parent 9ccf24c commit 952332d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ LOGOUT_URL

URL for the Django Logout action when using `USE_SESSION_AUTH`_.

**Default**: :python:`django.conf.settings.LOGOUT_URL`
**Default**: :python:`'/accounts/logout/'`

.. _security-definitions-settings:

Expand Down
2 changes: 1 addition & 1 deletion src/drf_yasg/app_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
'SECURITY_REQUIREMENTS': None,
'LOGIN_URL': getattr(settings, 'LOGIN_URL', None),
'LOGOUT_URL': getattr(settings, 'LOGOUT_URL', None),
'LOGOUT_URL': '/accounts/logout/',
'SPEC_URL': None,
'VALIDATOR_URL': '',
'PERSIST_AUTH': False,
Expand Down

0 comments on commit 952332d

Please sign in to comment.