Document `Session.is_empty`
It's often useful to check whether the user has a session, for example to avoid creating one unnecessarily. Since request.session is always populated when SessionMiddleware is used, it's better to check whether the session is empty. BaseSession has a is_empty method, but it's undocumented.
It should be documented.
Change History
(12)
| Component: |
contrib.sessions → Documentation
|
| Triage Stage: |
Unreviewed → Accepted
|
| Type: |
Uncategorized → Cleanup/optimization
|
| Owner: |
set to jaffar Khan
|
| Status: |
new → assigned
|
| Description: |
modified (diff)
|
| Patch needs improvement: |
set
|
| Patch needs improvement: |
unset
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Patch needs improvement: |
set
|
| Triage Stage: |
Ready for checkin → Accepted
|
| Patch needs improvement: |
unset
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
Thanks. Let's break out the
__bool__discussion somewhere else so that we can keep the doc fix on the fast-track.