Skip to content
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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.0
current_version = 0.1.1
commit = true
tag = true
tag_name = {new_version}
Expand Down
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.1.1 (2025-10-03)
------------------
- Include query parameters in redirect


0.1.0 (2020-03-08)
------------------
- Add SESSION_TIMEOUT_REDIRECT to set a custom URL for redirect users which
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
version = '0.1.0'
version = '0.1.1'
release = version

# The language for content autogenerated by Sphinx. Refer to documentation
Expand Down Expand Up @@ -139,7 +139,7 @@
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#
# html_title = u'django-session-timeout v0.1.0'
# html_title = u'django-session-timeout v0.1.1'

# A shorter title for the navigation bar. Default is the same as html_title.
#
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

setup(
name="django-session-timeout",
version="0.1.0",
version="0.1.1",
description="Middleware to expire sessions after specific amount of time",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion src/django_session_timeout/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.1.1"
3 changes: 2 additions & 1 deletion src/django_session_timeout/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ def process_request(self, request):
if session_is_expired:
request.session.flush()
redirect_url = getattr(settings, "SESSION_TIMEOUT_REDIRECT", None)
full_path = request.get_full_path()
if redirect_url:
return redirect(redirect_url)
else:
return redirect_to_login(next=request.path)
return redirect_to_login(next=full_path)

expire_since_last_activity = getattr(
settings, "SESSION_EXPIRE_AFTER_LAST_ACTIVITY", False
Expand Down