#19005: Allow class based views to be included in urls.py by name as a string
-----------------------------+--------------------------------------
     Reporter:  tanderegg    |                    Owner:  nobody
         Type:  New feature  |                   Status:  closed
    Component:  Core (URLs)  |                  Version:  master
     Severity:  Normal       |               Resolution:  wontfix
     Keywords:  cbv          |             Triage Stage:  Unreviewed
    Has patch:  0            |      Needs documentation:  0
  Needs tests:  0            |  Patch needs improvement:  0
Easy pickings:  0            |                    UI/UX:  0
-----------------------------+--------------------------------------

Comment (by aaugustin):

 One last note: you can use the following pattern:

 {{{

 class MyClassBasedView(View):
     # ...

 my_class_based_view = MyClassBasedView.as_view()
 }}}

 and then refer to `my_class_based_view` by name in the URLconf. Granted,
 it's one line of boilerplate.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19005#comment:5>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to