{{{
# django.contrib.auth.models.py
class AbstractBaseUser(models.Model):
password = models.CharField(_('password'), max_length=128)
}}}
I'd expect something like this in the above line:
{{{
class AbstractBaseUser(models.Model):
password = models.CharField(_('password'), max_length=128,
validators=validators_list())
}}}
This issue is related to #25052, but I'm not sure.
--
Ticket URL: <https://code.djangoproject.com/ticket/26133>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> Using the new password validation framework, it looks like
> {{{AbstractBaseUser}}} does not call password validators defined in
> {{{settings.py}}}:
>
> {{{
> # django.contrib.auth.models.py
>
> class AbstractBaseUser(models.Model):
> password = models.CharField(_('password'), max_length=128)
> }}}
>
> I'd expect something like this in the above line:
>
> {{{
> class AbstractBaseUser(models.Model):
> password = models.CharField(_('password'), max_length=128,
> validators=validators_list())
> }}}
>
> This issue is related to #25052, but I'm not sure.
New description:
Using the new password validation framework, it looks like
{{{AbstractBaseUser}}} does not call password validators defined in
{{{settings.py}}}:
{{{
# django.contrib.auth.models.py
class AbstractBaseUser(models.Model):
password = models.CharField(_('password'), max_length=128)
...
}}}
I'd expect something like this in the above line:
{{{
class AbstractBaseUser(models.Model):
password = models.CharField(_('password'), max_length=128,
validators=validators_list())
}}}
This issue is related to #25052, but I'm not sure.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/26133#comment:1>
Comment (by timgraham):
I'm not sure how/if that would work because the final value for `password`
is the hashed password and that's not the one we want to validate. Can you
describe or give example code of the case where you're seeing validation
is missing?
--
Ticket URL: <https://code.djangoproject.com/ticket/26133#comment:2>
* status: new => closed
* resolution: => invalid
Comment:
You are right Tim, I got confused by the fact that validation is made not
only in Models but also in Forms and other places. Sorry for the noise.
--
Ticket URL: <https://code.djangoproject.com/ticket/26133#comment:3>