#24055: Keep reference to view class for resolve()
--------------------------------+------------------------------------
     Reporter:  collinanderson  |                    Owner:  nobody
         Type:  New feature     |                   Status:  new
    Component:  Generic views   |                  Version:  master
     Severity:  Normal          |               Resolution:
     Keywords:                  |             Triage Stage:  Accepted
    Has patch:  1               |      Needs documentation:  1
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+------------------------------------
Changes (by loic):

 * needs_docs:  0 => 1
 * stage:  Unreviewed => Accepted


Comment:

 I agree it'd be nice to enable retrieving the actual class, we already
 preserve `__name__`, `__doc__`, etc. we might as well preserve the class
 itself.

 I was worried that decorators like `login_required` would wipe these
 anyway and that it may be too fragile as an API, but apparently it doesn't
 happen thanks to `functools.wraps()` preserving `__dict__`.

--
Ticket URL: <https://code.djangoproject.com/ticket/24055#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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.7d92432794e5dcbf602db19e4b9aba56%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to