#32553: Allow UserAttributeSimilarityValidator to validate against fields of
related models
------------------------------+--------------------------------------
     Reporter:  Meiyer        |                    Owner:  nobody
         Type:  New feature   |                   Status:  closed
    Component:  contrib.auth  |                  Version:  dev
     Severity:  Normal        |               Resolution:  wontfix
     Keywords:                |             Triage Stage:  Unreviewed
    Has patch:  0             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  0             |                    UI/UX:  0
------------------------------+--------------------------------------

Comment (by Mariusz Felisiak):

 > I do not see the complexity being mentioned in Mariusz’s feedback.

 I was talking about complexity of supporting related fields e.g. with
 lookups `user_attributes=('profile__description', 'username')`. On the
 other hand adding `get_user_attribute()` to
 `UserAttributeSimilarityValidator` is misleading, validators are not a
 place for such hooks, which are rather workarounds for a specific
 situation. `get_user_attribute()` would be useful but for a quite niche
 scenario i.e. when you have a user model with custom profile but you
 cannot control user properties.

 Finally, `UserAttributeSimilarityValidator` is a small validator, you can
 always create a custom implementation in your code.

 You can start a discussion on DevelopersMailingList if you don't agree.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32553#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.2eab9000fad937ee8d41150853ae676c%40djangoproject.com.

Reply via email to