Skip to content

Commit 827187f

Browse files
committed
docs: document filtering active users in Django
Companion to python-social-auth/social-app-django#802
1 parent ce1719d commit 827187f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/configuration/django.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,24 @@ not decoupled from this pattern by any abstraction layer. If you would like
230230
to implement your own alternate, please see the ``social_django.models`` and
231231
``social_django_mongoengine.models`` modules for guidance.
232232

233+
Active users filtering
234+
----------------------
235+
236+
By default the model allows only active users to authenticate. This can be
237+
customised by ``SOCIAL_AUTH_ACTIVE_USERS_FILTER`` setting which is passed as
238+
kwargs to the query set filter method.
239+
240+
.. code-block:: python
241+
:caption: Disable filtering for active users
242+
243+
SOCIAL_AUTH_ACTIVE_USERS_FILTER = {}
244+
245+
.. code-block:: python
246+
:caption: Use custom field to filter active users
247+
248+
SOCIAL_AUTH_ACTIVE_USERS_FILTER = {"deleted_account": False}
249+
250+
233251
234252
JSON field support
235253
------------------

0 commit comments

Comments
 (0)