Opened 11 years ago
Closed 10 years ago
#17236 closed Cleanup/optimization (fixed)
Documentation of session behavior during login
Reported by: | Byron Ruth | Owned by: | Christopher Medrela |
---|---|---|---|
Component: | Documentation | Version: | |
Severity: | Normal | Keywords: | |
Cc: | krzysiumed@… | 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
Discussion here: http://groups.google.com/group/django-developers/browse_thread/thread/93dd04dc07ddf612
This slice of code regarding the session behavior during login should be documented: https://github.com/django/django/blob/master/django/contrib/auth/__init__.py#L63-70
Attachments (2)
Change History (10)
comment:1 Changed 11 years ago by
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 Changed 10 years ago by
Owner: | changed from nobody to Christopher Medrela |
---|---|
Status: | new → assigned |
Changed 10 years ago by
Attachment: | patch.diff added |
---|
comment:3 Changed 10 years ago by
Cc: | krzysiumed@… added |
---|---|
Has patch: | set |
Type: | Uncategorized → Cleanup/optimization |
comment:4 Changed 10 years ago by
Patch needs improvement: | set |
---|
"Note that when logging in session," the grammar is off, not sure what exactly you meant
Also this is a change to a docstring, and Django's docs are not autogenerated, so docs should also be updated in the source files of the sphinx documentation.
Changed 10 years ago by
Attachment: | 17236_v2.diff added |
---|
comment:5 Changed 10 years ago by
Cc: | krzysiumed@… removed |
---|---|
Patch needs improvement: | unset |
OK, I amended the patch: the grammar was improved and a note in sphinx docs was added.
comment:6 Changed 10 years ago by
Cc: | krzysiumed@… added |
---|
comment:7 Changed 10 years ago by
Triage Stage: | Accepted → Ready for checkin |
---|
The docs need to point out that while going from an anonymous session to a logged in session, data set during the anonymous session is retained.
The first bullet point in the email is incorrect - the flush code does delete the session, causing a new session id to be created.
https://github.com/django/django/blob/master/django/contrib/sessions/backends/base.py#L240-257