Code

Changes between Version 10 and Version 11 of ClassBasedViews


Ignore:
Timestamp:
10/04/10 13:10:03 (4 years ago)
Author:
lukeplant
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ClassBasedViews

    v10 v11  
    114114 * The URLconf is slightly more verbose 
    115115 
     116==== classmethod2 ==== 
     117 
     118[http://github.com/spookylukey/django-class-based-views/tree/classmethod2 Implementation]. 
     119 
     120Similar to classmethod, but `as_view` returns a view functions when called, and arguments to `__init__()` can be passed to the `as_view` call.  
     121 
     122Example usage: 
     123{{{ 
     124    url(r'^detail/author/(?P<pk>\d+)/$', views.AuthorDetail.as_view(), name="author_detail"), 
     125    url(r'^detail/author/(?P<pk>\d+)/foo/$', views.AuthorDetail.as_view(foo=True), name="author_detail"), 
     126}}} 
     127 
     128Arguments against: 
     129 * The URLconf is slightly more verbose 
     130 
     131 
    116132==== HTTPResponse subclassing ==== 
    117133