X-Git-Url: https://git.sommitrealweird.co.uk/sommitrealweird.git/blobdiff_plain/4ad54bc9a9429a2c5c288192c663f75ae1e7aad9..refs/heads/django-4.2:/sommitrealweird/blog/urls.py?ds=inline diff --git a/sommitrealweird/blog/urls.py b/sommitrealweird/blog/urls.py index eeeb25b..7ce99ef 100644 --- a/sommitrealweird/blog/urls.py +++ b/sommitrealweird/blog/urls.py @@ -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 = [ - url(r'^(?P[0-9]{4})/(?P[0-9]{2})/(?P[0-9]{2})/(?P[^/]+)(/|)$', blog.views.blog_view), - url(r'^(?P[0-9]{4})(?P[0-9]{2})(?P[0-9]{2})-(?P[^/]+)\.html$', blog.views.blog_view), - url(r'^(?P[0-9]{4})(?P[0-9]{2})(?P[0-9]{2})(?P[0-9]{2})(?P[0-9]{2})-(?P[^/]+)\.html$', blog.views.blog_view), - url(r'^(?P[0-9]{4})/(?P[0-9]{2})/(?P[0-9]{2})/$', blog.views.blog_view), - url(r'^(?P[0-9]{4})/(?P[0-9]{2})/$', blog.views.blog_view), - url(r'^(?P[0-9]{4})/$', blog.views.blog_view), - url(r'^section/(?P
[^/]*)/$', blog.views.blog_index), - url(r'^$', blog.views.blog_index), + re_path(r'^(?P[0-9]{4})/(?P[0-9]{2})/(?P[0-9]{2})/(?P[^/]+)(/|)$', blog.views.blog_view), + re_path(r'^(?P[0-9]{4})(?P[0-9]{2})(?P[0-9]{2})-(?P[^/]+)\.html$', blog.views.blog_view), + re_path(r'^(?P[0-9]{4})(?P[0-9]{2})(?P[0-9]{2})(?P[0-9]{2})(?P[0-9]{2})-(?P[^/]+)\.html$', blog.views.blog_view), + re_path(r'^(?P[0-9]{4})/(?P[0-9]{2})/(?P[0-9]{2})/$', blog.views.blog_view), + re_path(r'^(?P[0-9]{4})/(?P[0-9]{2})/$', blog.views.blog_view), + re_path(r'^(?P[0-9]{4})/$', blog.views.blog_view), + re_path(r'^section/(?P
[^/]*)/$', blog.views.blog_index), + re_path(r'^$', blog.views.blog_index), ]