#13635: URLconfs should accept classes as views
-------------------------------------+--------------------------------------
          Reporter:  bfirsh          |         Owner:  bfirsh 
            Status:  new             |     Milestone:         
         Component:  Core framework  |       Version:  SVN    
        Resolution:                  |      Keywords:  urlconf
             Stage:  Accepted        |     Has_patch:  1      
        Needs_docs:  0               |   Needs_tests:  0      
Needs_better_patch:  0               |  
-------------------------------------+--------------------------------------
Comment (by bfirsh):

 Replying to [comment:1 lukeplant]:
 > Personally, I think that we should instead encourage people to create
 view functions out of view classes:
 > {{{
 > #!python
 > my_view = make_view(MyViewClass)
 > }}}
 >
 > (where `make_view` is a very easy to write utility that would be
 included in core).  This makes it much easier to handle decorators, and
 insulates the URLconf from implementation details (like the fact that the
 view is implemented using a class).
 >
 > We had some discussion about this: http://groups.google.com/group
 /django-
 developers/browse_thread/thread/e23d9a5a58fe5891/23b9b3aa96bbb7f2?lnk=gst
 >
 > But not many people responded to my point of view.

 I like this method because it is transparent for people who don't
 understand the threading issues. It would be quite confusing for users to
 explain why they need to use make_view().

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13635#comment:6>
Django <http://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 django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to