On Mon, Dec 12, 2011 at 2:27 PM, Victor Hooi <[email protected]> wrote:
> Hi,
>
> I might be stating the obvious, but the documentation for the newer CBV's is
> a little sparse:
>
> There's simple examples:
>
> https://docs.djangoproject.com/en/1.3/topics/class-based-views/
>
> As well as a generic list of mix-ins and in-built views:
>
> https://docs.djangoproject.com/en/1.3/ref/class-based-views/
>
> However, there's no fuller examples, or best practice notes. There's no
> explanation of any of the views beyond TemplateView, ListView and DetailView
> (e.g. UpdateView, DeleteView, RedirectView, or any of the date-based CBVs).
>
> Sure, if you trawl around, you'll find some examples:
>
> https://gist.github.com/1275204
> https://groups.google.com/d/topic/django-users/HdYBkywNeII/discussion
> http://stackoverflow.com/questions/5899810/class-based-view-extending-updateview-not-saving-form-correctlyhttp://stackoverflow.com/questions/6181041/updating-user-model-in-django-with-class-based-updateview
>
> However, it would be awesome if there were examples in the official Django
> documentation that set out once and for all how to use these new-fangled
> CBV's. I would love to use them more extensively, but it seems like I'd need
> to spend hours on Google to work out all the nuances.

To use an old favourite phrase: ... and a pony :-)

I have to bear the bulk of the responsibility for this. The CBV docs
that I committed would be charitably described as "barely adequate".
There is *lots* of room for improvement -- both in terms of organizing
what is already there, and adding extra documentation, such as
tutorials and howtos.

However, what I don't have is an abundance of spare time to address
these inadequacies. :-(

> Is this something that could be resolved before pushing out Django 1.4, or
> is it much lower on the list of priorities?

It certainly *could* be resolved. If a ready-to-use patch were
available right now, I doubt it would sit in triage for very long --
the problems with the CBV docs are a well known sore point.

However, we don't have such a patch. As always, what is missing is
someone with the time and inclination to do the work.

The good news is that this isn't an area where an expert is required
-- this is an area where anyone could step up and provide a patch. In
fact, a patch from a beginner would possibly be preferable, because
they don't come to the process with any preconceived ideas of what is
obvious and what needs explanation.

So - if anyone wants to get involved with contributing to Django, this
could be a great project. You don't even need to be too concerned
about exact language. The hard part of writing is always the first
draft, because you need to work out gross structure, examples, and so
on. Once a first draft exists, second and later drafts are much
easier.

If someone were to provide a strong first draft of improved CBV docs
(and got someone else in the community to review that draft), I
suspect that draft would receive some editorial attention from the
core team and find itself in trunk very quickly.

Yours,
Russ Magee %-)

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

Reply via email to