Opened 10 years ago
Closed 10 years ago
#26388 closed Cleanup/optimization (duplicate)
make is_anonymous and is_authenticated properties
| Reported by: | Cody Childers | Owned by: | Cody Childers |
|---|---|---|---|
| Component: | contrib.auth | Version: | 1.9 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
is_anonymous and is_authenticated on the User models should be properties because they're used like them and they just return True or False. It becomes difficult to use in the shell seeing user.is_active behave like expected but then user.is_anonymous is requiring user.is_anonymous() which isn't fitting any logical pattern
Change History (3)
comment:1 by , 10 years ago
| Type: | Uncategorized → Cleanup/optimization |
|---|
comment:2 by , 10 years ago
| Component: | Uncategorized → contrib.auth |
|---|
comment:3 by , 10 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Duplicate of #25847