]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/bpcms/urls.py
Update for newer django
[sommitrealweird.git] / sommitrealweird / bpcms / urls.py
index 9143a6714d3351d85549a4116bf4f786529169cf..2fc374cbe3aa7a15bbe2cd7cb90bdd11a27bd092 100644 (file)
@@ -1,8 +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'^(?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'),
+]