Code

Opened 7 years ago

Closed 7 years ago

#4544 closed (fixed)

list_filter can accept "choices"

Reported by: marcuzero@… Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: list_filter
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Page http://www.djangoproject.com/documentation/model-api/#list-filter says list_filter accepts BooleanField, DateField, DateTimeField or ForeignKey. Looks like IntegerField(choices=Foo)also works (at least at my site with 0.96)

Attachments (1)

4544_list_filter.diff (716 bytes) - added by Matt Croydon 7 years ago.
Documentation patch for list_filter to add two field types mentioned in ticket

Download all attachments as: .zip

Change History (8)

comment:1 Changed 7 years ago by Yaggo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

CharField(choices=...) seems to work, too. Running django svn revision 5428 (2007-06-02).

comment:2 Changed 7 years ago by Simon G. <dev@…>

  • Triage Stage changed from Unreviewed to Accepted

Want to work up docs patch? :)

Changed 7 years ago by Matt Croydon

Documentation patch for list_filter to add two field types mentioned in ticket

comment:3 Changed 7 years ago by Matt Croydon

  • Has patch set
  • Version changed from 0.96 to SVN

See attachment for patch to include CharField and IntegerField to list_filter documentation.

comment:4 Changed 7 years ago by Matt Croydon

  • Summary changed from list_filter can accept "choices" to [patch] list_filter can accept "choices"

Changed summary to indicate patch was available.

comment:5 Changed 7 years ago by ubernostrum

  • Summary changed from [patch] list_filter can accept "choices" to list_filter can accept "choices"

(restoring subject; the 'has_patch' flag does that now)

comment:6 Changed 7 years ago by Simon G. <dev@…>

  • Triage Stage changed from Accepted to Ready for checkin

comment:7 Changed 7 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(In [6179]) Fixed #4544 -- Updated docs for allowed field types in an admin list_filter. Thanks to Matt Croydon.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.