[Django] #23588: list_display method attributes description links

7 views
Skip to first unread message

Django

unread,
Oct 2, 2014, 8:28:40 PM10/2/14
to django-...@googlegroups.com
#23588: list_display method attributes description links
-------------------------------+--------------------
Reporter: eliasvc | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
Hello,

This is a piece of code that first describe the use of method attributes
in callback functions used in list_display on Django tutorial, page two
[https://docs.djangoproject.com/en/1.7/intro/tutorial02/]
{{{
class Question(models.Model):
# ...
def was_published_recently(self):
return self.pub_date >= timezone.now() -
datetime.timedelta(days=1)
was_published_recently.admin_order_field = 'pub_date'
was_published_recently.boolean = True
was_published_recently.short_description = 'Published recently?'
}}}

The problem is none of those method attribute definitions take you
somewhere where it describes what they do. It can be very confusing for a
person starting out. In fact, it would be awesome if there was some kind
of index of method attributes one can use since their descriptions on the
admin page are scattered.

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

Django

unread,
Oct 2, 2014, 8:31:50 PM10/2/14
to django-...@googlegroups.com
#23588: list_display method attributes description links
--------------------------------------+------------------------------------
Reporter: eliasvc | Owner: funkybob
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.7
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

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

* status: new => assigned
* needs_better_patch: => 0
* needs_tests: => 0
* owner: nobody => funkybob
* needs_docs: => 1
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted


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

Django

unread,
Oct 3, 2014, 1:19:11 AM10/3/14
to django-...@googlegroups.com
#23588: list_display method attributes description links
--------------------------------------+------------------------------------
Reporter: eliasvc | Owner: funkybob
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.7

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

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

Comment (by funkybob):

The simplest solution is to just add a link after this along the lines of:

For more information on these method properties, see `list_options`_

linking to the Admin.list_options doco. There's an earlier link where
it's mentioned the first time, but it doesn't hurt to reinforce.

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

Django

unread,
Nov 13, 2014, 2:16:24 PM11/13/14
to django-...@googlegroups.com
#23588: list_display method attributes description links
--------------------------------------+------------------------------------
Reporter: eliasvc | Owner: funkybob
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.7
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"3a550bb6d32172fc1ec5dd314d20ef1235db995a"]:
{{{
#!CommitTicketReference repository=""
revision="3a550bb6d32172fc1ec5dd314d20ef1235db995a"
Fixed #23588 -- Added a link in tutorial for list_display options.
}}}

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

Django

unread,
Nov 13, 2014, 2:16:51 PM11/13/14
to django-...@googlegroups.com
#23588: list_display method attributes description links
--------------------------------------+------------------------------------
Reporter: eliasvc | Owner: funkybob
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.7

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

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

Comment (by Tim Graham <timograham@…>):

In [changeset:"b050dc46a9758e370c5b05ff25a133b741ffe465"]:
{{{
#!CommitTicketReference repository=""
revision="b050dc46a9758e370c5b05ff25a133b741ffe465"
[1.7.x] Fixed #23588 -- Added a link in tutorial for list_display options.

Backport of 3a550bb6d32172fc1ec5dd314d20ef1235db995a from master
}}}

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

Reply all
Reply to author
Forward
0 new messages