X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ae60b2a3949e96357477cc04f90fd0873cee8a92..788c99a388fd34de4c159d6a3cefed84291b95f5:/src/lesmianator/urls.py?ds=inline diff --git a/src/lesmianator/urls.py b/src/lesmianator/urls.py index 37e363f8c..dbee5f808 100644 --- a/src/lesmianator/urls.py +++ b/src/lesmianator/urls.py @@ -1,14 +1,14 @@ -# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # -from django.conf.urls import url, patterns +from django.urls import path +from . import views -urlpatterns = patterns( - 'lesmianator.views', - url(r'^$', 'main_page', name='lesmianator'), - url(r'^wiersz/$', 'new_poem', name='new_poem'), - url(r'^lektura/(?P[a-z0-9-]+)/$', 'poem_from_book', name='poem_from_book'), - url(r'^polka/(?P[a-zA-Z0-9-]+)/$', 'poem_from_set', name='poem_from_set'), - url(r'^wiersz/(?P[a-zA-Z0-9-]+)/$', 'get_poem', name='get_poem'), -) + +urlpatterns = [ + path('', views.main_page, name='lesmianator'), + path('wiersz/', views.new_poem, name='new_poem'), + path('lektura//', views.poem_from_book, name='poem_from_book'), + path('polka//', views.poem_from_set, name='poem_from_set'), + path('wiersz//', views.get_poem, name='get_poem'), +]