]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/blog/urls.py
Update for newer django
[sommitrealweird.git] / sommitrealweird / blog / urls.py
index eeeb25be827f69b892a6aeea1c58641faf260309..7ce99ef3885fcc285cc367742b490478baca5982 100644 (file)
@@ -1,14 +1,14 @@
-from django.conf.urls import url
+from django.urls import re_path
 import blog.views
 from settings import MEDIA_ROOT, MEDIA_URL
 
 urlpatterns = [
 import blog.views
 from settings import MEDIA_ROOT, MEDIA_URL
 
 urlpatterns = [
-    url(r'^(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/(?P<day>[0-9]{2})/(?P<slug>[^/]+)(/|)$', blog.views.blog_view),
-    url(r'^(?P<year>[0-9]{4})(?P<month>[0-9]{2})(?P<day>[0-9]{2})-(?P<slug>[^/]+)\.html$', blog.views.blog_view),
-    url(r'^(?P<year>[0-9]{4})(?P<month>[0-9]{2})(?P<day>[0-9]{2})(?P<hour>[0-9]{2})(?P<minutes>[0-9]{2})-(?P<slug>[^/]+)\.html$', blog.views.blog_view),
-    url(r'^(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/(?P<day>[0-9]{2})/$', blog.views.blog_view),
-    url(r'^(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/$', blog.views.blog_view),
-    url(r'^(?P<year>[0-9]{4})/$', blog.views.blog_view),
-    url(r'^section/(?P<section>[^/]*)/$', blog.views.blog_index),
-    url(r'^$', blog.views.blog_index),
+    re_path(r'^(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/(?P<day>[0-9]{2})/(?P<slug>[^/]+)(/|)$', blog.views.blog_view),
+    re_path(r'^(?P<year>[0-9]{4})(?P<month>[0-9]{2})(?P<day>[0-9]{2})-(?P<slug>[^/]+)\.html$', blog.views.blog_view),
+    re_path(r'^(?P<year>[0-9]{4})(?P<month>[0-9]{2})(?P<day>[0-9]{2})(?P<hour>[0-9]{2})(?P<minutes>[0-9]{2})-(?P<slug>[^/]+)\.html$', blog.views.blog_view),
+    re_path(r'^(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/(?P<day>[0-9]{2})/$', blog.views.blog_view),
+    re_path(r'^(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/$', blog.views.blog_view),
+    re_path(r'^(?P<year>[0-9]{4})/$', blog.views.blog_view),
+    re_path(r'^section/(?P<section>[^/]*)/$', blog.views.blog_index),
+    re_path(r'^$', blog.views.blog_index),
 ]
 ]