]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/bpcms/urls.py
Update for newer django
[sommitrealweird.git] / sommitrealweird / bpcms / urls.py
index d29225af7e0dc49a1e3a10c70d32d474f1c4b02b..2fc374cbe3aa7a15bbe2cd7cb90bdd11a27bd092 100644 (file)
@@ -1,9 +1,9 @@
-from django.conf.urls.defaults import *
+from django.urls import re_path
+import bpcms.views
 
-urlpatterns = patterns('',
-    (r'^$', 'bpcms.views.document_view', {'slug': 'index'}),
-    (r'^css-docs/(?P<slug>.*)$', 'bpcms.views.css_view'),
-    (r'^(?P<slug>[^/]+)/$', 'bpcms.views.document_view'),
-    (r'^(?P<folders>.*)/(?P<slug>[^/]+)/$', 'bpcms.views.document_view'),
-)
+urlpatterns = [
+    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'),
+]