Django 2.2
[turniej.git] / apps / poetry / urls.py
index 8d0baeb..eb9b4f3 100644 (file)
@@ -1,11 +1,13 @@
-from django.conf.urls.defaults import *
+from django.conf.urls import url
+from . import views
 
 
-urlpatterns = patterns('poetry.views',
-    url(r'^wiersz/(?P<slug>[a-zA-Z0-9-]+)/$', 'poem', name='poetry_poem'),
 
 
-    url(r"^$", "main", name="poetry_main"),
-    url(r"^nowy/$", 'new', name="poetry_new"),
-    url(r"^(?P<slug>[a-zA-Z0-9-]+)/$", "poet", name="poetry_poet"),
-    url(r"^(?P<slug>[a-zA-Z0-9-]+)/nowy/$", 'new', name="poetry_new"),
+urlpatterns = [
+    url(r'^wiersz/(?P<slug>[a-zA-Z0-9-]+)/$', views.poem, name='poetry_poem'),
 
 
-)
+    url(r"^$", views.main, name="poetry_main"),
+    url(r"^nowy/$", views.new, name="poetry_new"),
+    url(r"^konkurs/$", views.contest, name="poetry_contest"),
+    url(r"^(?P<slug>[a-zA-Z0-9-]+)/$", views.poet, name="poetry_poet"),
+    url(r"^(?P<slug>[a-zA-Z0-9-]+)/nowy/$", views.new, name="poetry_new"),
+]