]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/bpcms/urls.py
fix: quick and dirty update to django 4.2
[sommitrealweird.git] / sommitrealweird / bpcms / urls.py
index 9143a6714d3351d85549a4116bf4f786529169cf..264af0ab5c9ba482c67e1facb7a6a1c57f4b65d3 100644 (file)
@@ -1,8 +1,10 @@
-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, {'slug': 'index'}, name='bpcms-document-view'),
+    re_path(r'^css-docs/(?P<slug>[^/]+)$', bpcms.views.css_view),
+    re_path(r'^(?P<slug>[^/]+)/$', bpcms.views.document_view, name='bpcms-document-view'),
+    re_path(r'^(?P<folders>.*)/(?P<slug>[^/]+)/$', bpcms.views.document_view, name='bpcms-document-view'),
+]