On Wed, Sep 19, 2012 at 6:42 PM, Cal Leeming [Simplicity Media Ltd]
<cal.leem...@simplicitymedialtd.co.uk> wrote:
> Thanks for clarifying, I see where my initial confusion was now.
>
> The reason this leak hadn't affected our apps was because we didn't use
> __init__ to set up the view, instead all the state logic was placed into
> __call__. Never the less, having a class call return a HTTPResponse will
> break class usage expectations (as mentioned in the wiki), so this still
> wouldn't be the cleanest approach.
>
> I think the majority of users seem to be put off by the complexity of using
> ListView/TemplateView, and not the actual class usage itself. If the
> documentation highlighted that there was a basic View() object available, it
> would make the learning curve a bit easier.
>
> Russell - Would you have any objection to me submitting a documentation
> patch (https://docs.djangoproject.com/en/1.4/topics/class-based-views/)
> which shows a basic example of how to use the View() class directly?

No objection at all. As I said in my original reply, the biggest
problem with CBVs is the documentation - something that is my
responsibility. Someone (ahem) needs to do a pretty serious rework
(or, at least, expansion) of the CBV documentation to point out all
the things that aren't obvious.

Danny Greenfeld was taking a look at some of these problems recently,
as were a couple of people at the recent PyCon AU and DjangoCon US
sprints, so if you want to dig into this, check the tickets before you
start serious drafting.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to