Django

Code

Ticket #3816 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

typo in Sessions docs

Reported by: jon austin <jon.i.austin@gmail.com> Assigned to: jacob
Milestone: Component: Documentation
Version: SVN Keywords: session
Cc: Triage Stage: Ready for checkin
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

Change History

03/25/07 16:08:15 changed by SmileyChris

  • needs_better_patch changed.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • needs_docs changed.

03/25/07 18:22:05 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #3816 (typo in Sessions docs)




Change Properties
Action