]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/bpcms/urls.py
Update for newer django
[sommitrealweird.git] / sommitrealweird / bpcms / urls.py
index 1a9111f3183e406acef207b3a789071414a80a06..2fc374cbe3aa7a15bbe2cd7cb90bdd11a27bd092 100644 (file)
@@ -1,10 +1,9 @@
-from django.conf.urls import url
+from django.urls import re_path
 import bpcms.views
 
 urlpatterns = [
-    url(r'^$', bpcms.views.document_view, {'slug': 'index'}, name='bpcms-document-view'),
-    url(r'^css-docs/(?P<slug>[^/]+)$', bpcms.views.css_view),
-    url(r'^(?P<slug>[^/]+)/$', bpcms.views.document_view, name='bpcms-document-view'),
-    url(r'^(?P<folders>.*)/(?P<slug>[^/]+)/$', bpcms.views.document_view, name='bpcms-document-view'),
+    re_path(r'^$', bpcms.views.document_view, {'path': 'index'}, name='bpcms-document-view'),
+    re_path(r'^css-docs/(?P<slug>[^/]+)$', bpcms.views.css_view),
+    re_path(r'^(?P<path>.*)/$', bpcms.views.document_view, name='bpcms-document-view'),
 ]