Merge branch 'img-playground' of ssh://git.nowoczesnapolska.org.pl:2223/~/repo/redakc...
[redakcja.git] / apps / wiki_img / urls.py
index 075e5ad..518da6b 100644 (file)
@@ -1,20 +1,24 @@
 # -*- coding: utf-8
 from django.conf.urls.defaults import *
 # -*- coding: utf-8
 from django.conf.urls.defaults import *
-from django.conf import settings
-from django.views.generic.list_detail import object_list
 
 
-from wiki_img.models import ImageDocument
-
-
-PART = ur"""[ ĄĆĘŁŃÓŚŻŹąćęłńóśżź0-9\w_.-]+"""
 
 urlpatterns = patterns('wiki_img.views',
 
 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"),
 
         '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"),
 
         '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"),
+
 )
 )