Automatically search for the next match after single replace, fixes #3384
[redakcja.git] / apps / wiki_img / urls.py
index 075e5ad..6a516f3 100644 (file)
@@ -1,20 +1,24 @@
 # -*- coding: utf-8
-from django.conf.urls.defaults import *
-from django.conf import settings
-from django.views.generic.list_detail import object_list
+from django.conf.urls import patterns, url
 
-from wiki_img.models import ImageDocument
-
-
-PART = ur"""[ ĄĆĘŁŃÓŚŻŹąćęłńóśżź0-9\w_.-]+"""
 
 urlpatterns = patterns('wiki_img.views',
-    url(r'^$', object_list, {'queryset': ImageDocument.objects.all(), "template_name": "wiki_img/document_list.html"}),
-
-    url(r'^edit/(?P<slug>%s)$' % PART,
+    url(r'^edit/(?P<slug>[^/]+)/$',
         'editor', name="wiki_img_editor"),
 
-    url(r'^(?P<slug>[^/]+)/text$',
+    url(r'^readonly/(?P<slug>[^/]+)/$',
+        'editor_readonly', name="wiki_img_editor_readonly"),
+
+    url(r'^text/(?P<image_id>\d+)/$',
         'text', name="wiki_img_text"),
 
+    url(r'^history/(?P<object_id>\d+)/$',
+        'history', name="wiki_img_history"),
+
+    url(r'^revert/(?P<object_id>\d+)/$',
+        '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"),
+
 )