3) Use the only configured backend, if there is only one.
4) Raise ValueError("You have multiple authentication backends
configured; you must provide the `backend` argument to `login`.")

What about defaulting the backend argument to Django's default auth backend? This way most of the sites will not need to worry about it while the API is maintained simple and without "magic".

Those sites that use some other auth backend would need to pass it explicitly into the login function. If they don't do that (or, for that matter, if you pass an auth backend which is not present in your settings) they would get an error.


--
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 django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
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/20150524081707.GD26209%40def.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: Digital signature

Reply via email to