#14829: Documentation for url() with class-based generic views
--------------------------------------------------------------+-------------
          Reporter:  Andrew Willey <and...@aawsolutions.com>  |         Owner:  
nobody   
            Status:  new                                      |     Milestone:  
1.3      
         Component:  Documentation                            |       Version:  
1.3-alpha
        Resolution:                                           |      Keywords:  
url      
             Stage:  Unreviewed                               |     Has_patch:  
0        
        Needs_docs:  0                                        |   Needs_tests:  
0        
Needs_better_patch:  0                                        |  
--------------------------------------------------------------+-------------
Changes (by Alex):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Old description:

> It would be nice to update the url() documentation here
>
> http://docs.djangoproject.com/en/dev/topics/http/urls/#url
>
> to reflect that using class-based generic views means you pass the class
> object instead of view='some_view' and that class-based views must be
> imported as opposed to included in the patterns arguments.
>
> example:
> from myapp.views import *
>
> urlpatterns += patterns('',
>     url(GenericViewClass.as_view(), name='the_url_name'),
> )

New description:

 It would be nice to update the url() documentation here

 http://docs.djangoproject.com/en/dev/topics/http/urls/#url

 to reflect that using class-based generic views means you pass the class
 object instead of {{{ view='some_view' }}} and that class-based views must
 be imported as opposed to included in the patterns arguments.

 example:
 {{{
 from myapp.views import *

 urlpatterns += patterns('',
     url(GenericViewClass.as_view(), name='the_url_name'),
 )
 }}}

Comment:

 Fixed up the formatting.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14829#comment:1>
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