Obey length limits for wikidata import.
[redakcja.git] / src / wiki_img / urls.py
index 6a516f3..0c9e848 100644 (file)
@@ -1,24 +1,26 @@
-# -*- coding: utf-8
-from django.conf.urls import patterns, url
+# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
+from django.urls import path
+from . import views
 
 
 
 
-urlpatterns = patterns('wiki_img.views',
-    url(r'^edit/(?P<slug>[^/]+)/$',
-        'editor', name="wiki_img_editor"),
+urlpatterns = [
+    path('edit/<slug:slug>/',
+        views.editor, name="wiki_img_editor"),
 
 
-    url(r'^readonly/(?P<slug>[^/]+)/$',
-        'editor_readonly', name="wiki_img_editor_readonly"),
+    path('readonly/<slug:slug>/',
+        views.editor_readonly, name="wiki_img_editor_readonly"),
 
 
-    url(r'^text/(?P<image_id>\d+)/$',
-        'text', name="wiki_img_text"),
+    path('text/<int:image_id>/',
+        views.text, name="wiki_img_text"),
 
 
-    url(r'^history/(?P<object_id>\d+)/$',
-        'history', name="wiki_img_history"),
+    path('history/<int:object_id>/',
+        views.history, name="wiki_img_history"),
 
 
-    url(r'^revert/(?P<object_id>\d+)/$',
-        'revert', name='wiki_img_revert'),
+    path('revert/<int:object_id>/',
+        views.revert, name='wiki_img_revert'),
 
 
-    url(r'^diff/(?P<object_id>\d+)/$', 'diff', name="wiki_img_diff"),
-    url(r'^pubmark/(?P<object_id>\d+)/$', 'pubmark', name="wiki_img_pubmark"),
-
-)
+    path('diff/<int:object_id>/', views.diff, name="wiki_img_diff"),
+    path('pubmark/<int:object_id>/', views.pubmark, name="wiki_img_pubmark"),
+]