Skip to content

Commit

Permalink
Enable configurable root URL paths
Browse files Browse the repository at this point in the history
  • Loading branch information
blag committed Oct 17, 2023
1 parent eb315b2 commit 7538ae0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Installation
``'django.contrib.sessions.middleware.SessionMiddleware'`` with
``'user_sessions.middleware.SessionMiddleware'``.
4. Add ``SESSION_ENGINE = 'user_sessions.backends.db'``.
5. Add ``url(r'', include('user_sessions.urls', 'user_sessions')),`` to your
5. Add ``url('account/', include('user_sessions.urls', 'user_sessions')),`` to your
``urls.py``.
6. Make sure ``LOGOUT_REDIRECT_URL`` is set to some page to redirect users
after logging out.
Expand Down
2 changes: 1 addition & 1 deletion example/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
),
name='home',
),
re_path(r'', include('user_sessions.urls', namespace='user_sessions')),
re_path(r'account/', include('user_sessions.urls', namespace='user_sessions')),
re_path(r'^admin/', admin.site.urls),
]

Expand Down
2 changes: 1 addition & 1 deletion tests/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ def modify_session(request):
path('', empty),
path('modify_session/', modify_session),
path('admin/', admin.site.urls),
path('', include('user_sessions.urls', namespace='user_sessions')),
path('account/', include('user_sessions.urls', namespace='user_sessions')),
]
4 changes: 2 additions & 2 deletions user_sessions/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
app_name = 'user_sessions'
urlpatterns = [
path(
'account/sessions/',
'sessions/',
view=SessionListView.as_view(),
name='session_list',
),
path(
'account/sessions/other/delete/',
'sessions/other/delete/',
view=SessionDeleteOtherView.as_view(),
name='session_delete_other',
),
Expand Down

0 comments on commit 7538ae0

Please sign in to comment.