We can't default the `backend` argument to anything but a sentinel
value, because if it's supplied, it should take priority, but if it's
not supplied we need to maintain backwards compatibility with existing
behavior, where the `user.backend` annotation is used.

So, to sum app, the behaviour would be:

- If the backend argument is not the sentinel, use that backend.
- Else, if `user.backend` is present, use that backend.
- Else, use Django's default auth backend.

I think it's somewhat important to be explicit about the backend we want to use if that backend is not Django's default one. By defaulting to the backend defined in settings if there is only one present we are introducing a bit more of magic.


--
unai

--
You received this message because you are subscribed to the Google Groups "Django 
developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/20150525165243.GA2689%40def.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: Digital signature

Reply via email to