Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sphinx and add read the docs #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,33 @@ Installation
.. code-block:: shell

pip install django_session_timeout

Usage
=====

Update your settings to add the SessionTimeoutMiddleware:

.. code-block:: python

MIDDLEWARE_CLASSES = [
# ...
'django.contrib.sessions.middleware.SessionMiddleware',
'django_session_timeout.middleware.SessionTimeoutMiddleware',
# ...
]


And also add the ``SESSION_EXPIRE_SECONDS``:


.. code-block:: python

SESSION_EXPIRE_SECONDS = 3600 # 1 hour


By default, the session will expire X seconds after the start of the session.
To expire the session X seconds after the `last activity`, use the following setting:

.. code-block:: python

SESSION_EXPIRE_AFTER_LAST_ACTIVITY = True
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import find_packages, setup

docs_require = [
'sphinx>=1.4.0',
'sphinx>=1.8.4',
]

tests_require = [
Expand Down