aboutsummaryrefslogtreecommitdiffstats
path: root/97suifangqa/apps/sciblog/urls.py
diff options
context:
space:
mode:
Diffstat (limited to '97suifangqa/apps/sciblog/urls.py')
-rw-r--r--97suifangqa/apps/sciblog/urls.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/97suifangqa/apps/sciblog/urls.py b/97suifangqa/apps/sciblog/urls.py
new file mode 100644
index 0000000..722984b
--- /dev/null
+++ b/97suifangqa/apps/sciblog/urls.py
@@ -0,0 +1,17 @@
+from django.conf.urls import patterns, url
+
+from .models import SciBlog, BlogAnnotation
+from .views import *
+
+blog_blocks = '|'.join(['source','abstract', 'knowledge','follow', 'results', 'comment','refrences', 'test','results-detail'])
+urlpatterns = patterns('',
+ url(r'^$', query, name='list_blogs'),
+ url(r'^result(\d+)/?$', show_result, name='blog_result'),
+ url(r'^index$', blog_index, name='index'),
+ url(r'^query/?$', query, name='query_blogs'),
+ url(r'^collection/?$', blog_collection, name='blog_collection'),
+ url(r'^(\d+)/(%s)?/?$' % blog_blocks, blog_detail, name='blog_detail'),
+ url(r'^(\d+)/collect/?$', add_user_to_m2m, name='blog_collect', kwargs={'m2m':'collected_by'}),
+ url(r'^(\d+)/understand/?$', add_user_to_m2m, name='blog_understood', kwargs={'m2m':'catched_by'}),
+ url(r'^annotation/(\d+)/collect/?$', add_user_to_m2m, name='annotation_collect', kwargs={'m2m':'collected_by', 'model': BlogAnnotation}),
+ )