Skip to content

Latest commit

 

History

History
executable file
·
16 lines (10 loc) · 326 Bytes

auth.rst

File metadata and controls

executable file
·
16 lines (10 loc) · 326 Bytes

EmailOrUsernameModelBackend

Backend to login using email or username.

Usage:

Add before the default ModelBackend

AUTHENTICATION_BACKENDS = (
    'django_stuff.backends.auth.EmailOrUsernameModelBackend',
    'django.contrib.auth.backends.ModelBackend'
)