diff --git a/session_security/urls.py b/session_security/urls.py
index <HASH>..<HASH> 100644
--- a/session_security/urls.py
+++ b/session_security/urls.py
@@ -15,9 +15,12 @@ ie::
 
 """
 try:
-    from django.conf.urls import url
+    from django.urls import re_path as url
 except ImportError:
-    from django.conf.urls.defaults import url
+    try:
+        from django.conf.urls import url
+    except ImportError:
+        from django.conf.urls.defaults import url
 
 from .views import PingView
django.conf.urls.url() deprecated in Django <I>

Results in the following warning:
RemovedInDjango<I>Warning: django.conf.urls.url() is deprecated in favor of django.urls.re_path().