The newest built-during the authentication models ensure that assumptions concerning user model that he’s handling
Built-from inside the variations¶
Or even want to make use of the fresh new established-in the views, however, wanted the genuine convenience of without having to enter versions having this capability, this new authentication system will bring several depending-during the versions situated in django.contrib.auth.versions :
When you are using a custom made member design , it may be needed to describe their versions toward authentication system. To learn more, refer to brand new papers regarding making use of the established-in the verification forms with customized representative patterns .
By default, AuthenticationForm rejects pages whoever are_energetic flag is set to help you Untrue . You are able to override that it choices that have a personalized rules to determine and this pages is also log on. Accomplish that having a personalized setting one to subclasses AuthenticationForm and you can overrides the fresh new prove_login_allowed() approach. This method is increase a good ValidationError in case the considering associate can get perhaps not log in.
Spends this new objections to deliver a keen EmailMultiAlternatives . Can be overridden so you can tailor how email is sent so you can the consumer.
It has three areas: username (about associate design), password1 , and you will password2 . It verifies one password1 and you will password2 suits, validates the latest password having fun with examine_password() , and you will establishes brand new customer’s password having fun with put_password() . (más…)