#29005: django object builder
---------------------------------+--------------------------------------
     Reporter:  Sergey Glazyrin  |                    Owner:  nobody
         Type:  New feature      |                   Status:  closed
    Component:  Core (Other)     |                  Version:  master
     Severity:  Normal           |               Resolution:  wontfix
     Keywords:  builder 3party   |             Triage Stage:  Unreviewed
    Has patch:  1                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by Sergey Glazyrin):

 I need request object in get_user function. Besides of its available in
 authenticate method, but it would be useful to have it in auth backend
 object as attribute of this object. So all methods of the backend get
 access to request.

 https://github.com/openstack/horizon/blob/master/openstack_auth/backend.py#L78

 Well, about djangoobjectbuilder, it simplifies patching Django objects in
 any place you want and it's totally up to Martin Fowler catalog of design
 patterns.
 Right now to achieve what I need, I redefine function get_user from
 django.contrib.auth module and this is bad idea because then I'll need to
 keep it up when update Django, etc, but with my solution, we change almost
 nothing.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29005#comment:2>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/075.0f01e9762c71e4cb8afcfe749f6f3201%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to