Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#36898 closed Cleanup/optimization (fixed)

Document `Session.is_empty`

Reported by: Jake Howard Owned by: jaffar Khan
Component: Documentation Version: 4.2
Severity: Normal Keywords:
Cc: jaffar Khan Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Jake Howard)

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)

comment:1 by jaffar Khan, 3 weeks ago

Cc: jaffar Khan added

comment:2 by Jacob Walls, 3 weeks ago

Component: contrib.sessionsDocumentation
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

Thanks. Let's break out the __bool__ discussion somewhere else so that we can keep the doc fix on the fast-track.

comment:3 by jaffar Khan, 3 weeks ago

Owner: set to jaffar Khan
Status: newassigned

Want to work on this ticket

comment:4 by Jake Howard, 3 weeks ago

Description: modified (diff)

comment:5 by jaffar Khan, 3 weeks ago

Has patch: set

comment:7 by Jacob Walls, 3 weeks ago

Patch needs improvement: set

comment:8 by Jacob Walls, 3 weeks ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:9 by Jacob Walls, 3 weeks ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

comment:10 by Jacob Walls, 3 weeks ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:11 by Jacob Walls <jacobtylerwalls@…>, 3 weeks ago

Resolution: fixed
Status: assignedclosed

In 13299a6:

Fixed #36898 -- Documented SessionBase.is_empty().

comment:12 by Jacob Walls <jacobtylerwalls@…>, 3 weeks ago

In 03a15d1:

[6.0.x] Fixed #36898 -- Documented SessionBase.is_empty().

Backport of 13299a6203f4bc3e5b2552c96a51ff2b15da3c43 from main.

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