Code

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#8360 closed (duplicate)

Admin site filtering on fields of boolean type produces for "No(False)" option the same results as for "Yes(True)" option.

Reported by: arthur78 Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords: list_filter filter BooleanField
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

-- models.py --

class User(models.Model):
    is_active = models.BooleanField(default=True)


-- admin.py --

class UserAdmin(admin.ModelAdmin):
    list_filter = ('is_active', )
admin.site.register(User, UserAdmin)


-- url variants for filtering in admin site --

a) ../user/?is_active__exact=1  # "Yes" option
b) ../user/?is_active__exact=0  # "No" option, produces the same result list as for "Yes" option

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by arthur78

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

comment:2 Changed 6 years ago by simon

Duplicate of #8101

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.