Changes between Version 11 and Version 12 of ClassBasedViews


Ignore:
Timestamp:
10/12/10 13:02:19 (4 years ago)
Author:
lukeplant
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ClassBasedViews

    v11 v12  
    2626
    2727=== View instantiation and thread safety ===
    28 The [http://groups.google.com/group/django-developers/browse_thread/thread/e23d9a5a58fe5891 most recent django-developers discussion on the topic] discussed many of the available options on instantiating the views and protecting them from threading issues. Here is a summary of the various approaches that have been proposed.
     28The [http://groups.google.com/group/django-developers/browse_thread/thread/27cec79b784ef73f?hl=en1 most recent django-developers discussion on the topic], and [http://groups.google.com/group/django-developers/browse_thread/thread/e23d9a5a58fe589 an older thread] discussed many of the available options on instantiating the views and protecting them from threading issues. Here is a summary of the various approaches that have been proposed.
     29
     30Some examples showing the essence of each of them without the other details:  http://bitbucket.org/spookylukey/django-class-views-experiments/src/tip/
    2931
    3032==== Store state on request, not view ====
     
    128130Arguments against:
    129131 * The URLconf is slightly more verbose
     132 * If you do `AuthorDetail(foo=True).as_view()`, instead of `AuthorDetail.as_view(foo=True)`, you will not get an exception, but `foo=True` will effectively be ignored.
    130133
    131134
     
    151154==== Recommendation ====
    152155
    153 Based on these discussions, plus in-person discussions at !DjangoCon.eu,  `__copy__()` on `__call__()` appears to be a slight front runner, with `__new__()` as a close runner up.
     156Based on these discussions, classmethod2 appears to be the winner.
    154157
    155158=== Class Hierarchy ===
Back to Top