Code

Opened 7 years ago

Closed 7 years ago

#3816 closed (fixed)

typo in Sessions docs

Reported by: jon austin <jon.i.austin@…> Owned by: jacob
Component: Documentation Version: master
Severity: Keywords: session
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

hi,

found a small type in the sessions docs sample code (http://www.djangoproject.com/documentation/sessions/):

Session.objects.get_object should be Session.objects.get

Using sessions out of views

Internally, each session is just a normal Django model. The Session model is defined in django/contrib/sessions/models.py. Because it’s a normal model, you can access sessions using the normal Django database API:

>>> from django.contrib.sessions.models import Session
>>> s = Session.objects.get_object(pk='2b1189a188b44ad18c35e113ac6ceead')
>>> s.expire_date
datetime.datetime(2005, 8, 20, 13, 35, 12)

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 7 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [4825]) Fixed #3816 -- Fixed typo in docs/sessions.txt. Thanks, jon austin

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.