[Django] #19898: Document why/when of class-based views

11 views
Skip to first unread message

Django

unread,
Feb 23, 2013, 1:41:29 PM2/23/13
to django-...@googlegroups.com
#19898: Document why/when of class-based views
-------------------------------+--------------------
Reporter: estebistec | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Keywords: docs
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
The documentation for class-based views is getting better, but it's
missing an introductory discussion of why and when you use them.
Specifically, the goals of such a narrative should be:

* Practical context for choosing CBVs vs. FBVs
* Usage patterns appropriate to class-based views
* List of helpful, concrete decision points from the above discussion

Hopefully this can be something that people point to for diffusing
absolutist arguments for CBVs or FBVs, and the community can start to
agree when each is right (a bit of a grandiose goal, yes, but it should be
possible).

New documentation that may arise out of the above needs:
* How to test class-based views (and comparison with testing FBVs)

Ticket #19227 aims to provide visualizations code flows in class-based
views and so may interact with some of the changes made on this ticket.

--
Ticket URL: <https://code.djangoproject.com/ticket/19898>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 23, 2013, 1:53:55 PM2/23/13
to django-...@googlegroups.com
#19898: Document why/when of class-based views
-------------------------------+--------------------------------------

Reporter: estebistec | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:

Keywords: docs | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by timo):

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


Comment:

#16807 contains a bunch of text that may be useful to build on for this.

--
Ticket URL: <https://code.djangoproject.com/ticket/19898#comment:1>

Django

unread,
Feb 23, 2013, 2:00:28 PM2/23/13
to django-...@googlegroups.com
#19898: Document why/when of class-based views
-------------------------------+--------------------------------------

Reporter: estebistec | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:

Keywords: docs | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by estebistec):

Thanks, I'll take a look at this.

--
Ticket URL: <https://code.djangoproject.com/ticket/19898#comment:2>

Django

unread,
Feb 23, 2013, 3:42:52 PM2/23/13
to django-...@googlegroups.com
#19898: Document why/when of class-based views
-------------------------------+--------------------------------------

Reporter: estebistec | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:

Keywords: docs | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by estebistec):

Going to be working over here: https://github.com/estebistec/django/tree
/cbvs-choice-usage

Humble beginnings with an introductory blurb:
https://github.com/estebistec/django/commit/34e29c62e5c3c072ab49fb089ecb3d34a8d48ae7

--
Ticket URL: <https://code.djangoproject.com/ticket/19898#comment:3>

Django

unread,
Feb 23, 2013, 3:43:48 PM2/23/13
to django-...@googlegroups.com
#19898: Document why/when of class-based views
-------------------------------+--------------------------------------

Reporter: estebistec | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:

Keywords: docs | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by estebistec):

From the intro text on the topic index page, there will likely be two new
pages:

* usage-patterns
* testing

/plan

--
Ticket URL: <https://code.djangoproject.com/ticket/19898#comment:4>

Django

unread,
Feb 23, 2013, 4:10:24 PM2/23/13
to django-...@googlegroups.com
#19898: Document why/when of class-based views
-------------------------------+------------------------------------

Reporter: estebistec | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:
Keywords: docs | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by jacob):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/19898#comment:5>

Django

unread,
Feb 23, 2013, 4:23:01 PM2/23/13
to django-...@googlegroups.com
#19898: Document why/when of class-based views
---------------------------------+------------------------------------

Reporter: estebistec | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:
Keywords: docs sprint2013 | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by estebistec):

* keywords: docs => docs sprint2013


--
Ticket URL: <https://code.djangoproject.com/ticket/19898#comment:6>

Django

unread,
Feb 23, 2013, 4:23:39 PM2/23/13
to django-...@googlegroups.com
#19898: Document why/when of class-based views
---------------------------------+--------------------------------------
Reporter: estebistec | Owner: estebistec
Type: Uncategorized | Status: assigned
Component: Uncategorized | Version: master

Severity: Normal | Resolution:
Keywords: docs sprint2013 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by estebistec):

* owner: nobody => estebistec
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/19898#comment:7>

Django

unread,
Feb 24, 2013, 6:13:09 PM2/24/13
to django-...@googlegroups.com
#19898: Document why/when of class-based views
---------------------------------+--------------------------------------
Reporter: estebistec | Owner: estebistec
Type: Uncategorized | Status: assigned
Component: Uncategorized | Version: master

Severity: Normal | Resolution:
Keywords: docs sprint2013 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------

Comment (by estebistec):

Welp, I should have figured working on CBV docs might not be easily
wrapped up in a weekend. So I'm already assuming that this is only the
start for this effort and I'll plan to continue and see it through. The
biggest thing with a larger doc effort like this is that I need to do the
due diligence of having others check perspective and voice of the
narrative, in addition to commenting on the clarity of the details.

I think I've got some decent content, but I'd like more compelling
examples for usage patterns, as I don't think I'm yet succeeding in
differentiating class and function based views in a way people haven't
already discussed, save for maybe my testing discussion.

So, core devs, if you have a moment I wouldn't mind some comments on my
current direction before I continue.

My current efforts live in a pull request here:
https://github.com/django/django/pull/840

--
Ticket URL: <https://code.djangoproject.com/ticket/19898#comment:8>

Django

unread,
Feb 24, 2013, 6:15:54 PM2/24/13
to django-...@googlegroups.com
#19898: Document why/when of class-based views
---------------------------------+--------------------------------------
Reporter: estebistec | Owner: estebistec
Type: Uncategorized | Status: assigned
Component: Uncategorized | Version: master

Severity: Normal | Resolution:
Keywords: docs sprint2013 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------

Comment (by estebistec):

Also, I'd like to do a survey of all the examples in existing CBV docs and
make sure they are complete and independent (meaning views are wired to
URLs, all necessary imports are present, etc.) That'll come after I get
this new usage-pattern page worked out better.

--
Ticket URL: <https://code.djangoproject.com/ticket/19898#comment:9>

Django

unread,
Mar 15, 2013, 3:52:56 AM3/15/13
to django-...@googlegroups.com
#19898: Document why/when of class-based views
---------------------------------+--------------------------------------
Reporter: estebistec | Owner: estebistec
Type: Uncategorized | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: docs sprint2013 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by aaugustin):

* component: Uncategorized => Documentation


--
Ticket URL: <https://code.djangoproject.com/ticket/19898#comment:10>

Django

unread,
Oct 17, 2013, 9:26:57 AM10/17/13
to django-...@googlegroups.com
#19898: Document why/when of class-based views
---------------------------------+--------------------------------------
Reporter: estebistec | Owner: estebistec
Type: New feature | Status: assigned

Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: docs sprint2013 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by timo):

* needs_better_patch: 0 => 1
* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/19898#comment:12>

Django

unread,
Oct 23, 2020, 6:38:13 AM10/23/20
to django-...@googlegroups.com
#19898: Document why/when of class-based views
---------------------------------+------------------------------------
Reporter: Steven Cummings | Owner: (none)
Type: New feature | Status: new

Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: docs sprint2013 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* owner: Steven Cummings => (none)
* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/19898#comment:13>

Django

unread,
Mar 18, 2024, 3:12:32 AM3/18/24
to django-...@googlegroups.com
#19898: Document why/when of class-based views
---------------------------------+------------------------------------
Reporter: Steven Cummings | Owner: (none)
Type: New feature | Status: new
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: docs sprint2013 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Ülgen Sarıkavak):

* cc: Ülgen Sarıkavak (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/19898#comment:14>
Reply all
Reply to author
Forward
0 new messages