Opened 4 years ago

Closed 4 years ago

#14644 closed (wontfix)

UserManager has no method active()

Reported by: anonymous Owned by: nobody
Component: contrib.auth Version: 1.2
Severity: Keywords: User UserManager is_active
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The User model has an is_active field, but there is no easy way to get all users which are active, which is most of the time what we need.

User.objects.active() seems like a proper way to get all active users.

It is shorter than

User.objects.filter(is_active=True)

which is more verbose and leads to more typing errors.

Change History (1)

comment:1 Changed 4 years ago by russellm

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

Active is an attribute of a model. You use filter to query based on attributes of a model. I don't see why we need to make a special case of active for querying purposes

Note: See TracTickets for help on using tickets.
Back to Top