I've been maintaining a custom django backend for quite awhile now. It 
delegates authentication and authorization to an internal API. I do not use 
a custom User model at all.

The backend completely handles the reset/change password logic, and the 
form uses the methods on the backend directly. If you have multiple 
backends then you need to work out where to save the used backend (either 
on the User model or in the session) so you can access it from the form.

If you're using multiple backends and have different form requirements per 
backend, then there is no way (that I can imagine) to create a 
one-stop-form to solve all requirements. Build multiple forms, check which 
backend is in use and display the appropriate form from the view. Call 
methods on the backend from the form.

Your requirements aren't unusual, but it's something that can be solved 
quite easily by user code, and extremely difficult to generalise. The 
backends take the most work, especially if you're implementing your own 
custom permissions. Forms are the easy part. I can't see why you'd ever 
need to modify the User just to support backends, but I may be missing 
something.

Happy to share anonymised backend and forms if you wish.

Josh

-- 
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/e6efb2e5-73af-4808-a0d0-685bab569111%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to