]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blob - sommitrealweird/blog/urls.py
Update for newer django
[sommitrealweird.git] / sommitrealweird / blog / urls.py
1 from django.urls import re_path
2 import blog.views
3 from settings import MEDIA_ROOT, MEDIA_URL
4
5 urlpatterns = [
6     re_path(r'^(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/(?P<day>[0-9]{2})/(?P<slug>[^/]+)(/|)$', blog.views.blog_view),
7     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),
8     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),
9     re_path(r'^(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/(?P<day>[0-9]{2})/$', blog.views.blog_view),
10     re_path(r'^(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/$', blog.views.blog_view),
11     re_path(r'^(?P<year>[0-9]{4})/$', blog.views.blog_view),
12     re_path(r'^section/(?P<section>[^/]*)/$', blog.views.blog_index),
13     re_path(r'^$', blog.views.blog_index),
14 ]