Opened 14 years ago
Closed 14 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: | no | UI/UX: | no |
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.
Note:
See TracTickets
for help on using tickets.
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