aboutsummaryrefslogtreecommitdiffstats
path: root/97suifangqa/apps/sciblog/urls.py
diff options
context:
space:
mode:
authorAlvin Li <liweitianux@gmail.com>2013-09-20 23:52:59 +0800
committerAlvin Li <liweitianux@gmail.com>2013-09-20 23:52:59 +0800
commitc9da4168874296cf4f5ba71b9a432ceae3c26130 (patch)
tree0c986d630c9634b8dbbbbe694546b42c7bb74210 /97suifangqa/apps/sciblog/urls.py
parent62efe8809e2cdfc84666dbd5e987a4ce473a047a (diff)
download97dev-c9da4168874296cf4f5ba71b9a432ceae3c26130.tar.bz2
*** merged changes of front pages ***
* merged changes from '97suifang-front' by mjymjydark; and modified to work with django * finished 'editing_data' div of 'SheetDefault' for add new record * added 'indicator.views.ajax_add_record()' *** search *** * improved 'search' function of 'NewDeleteIndex' page; employ AJAX to load search results; * added 'indicator.views.search_indicators()' *** recommend indicator *** * improved the functions of 'recommend_indicator' * added 'sciblog.models.UserCollection' to record the collection information for each user * improved 'sciblog.views.add_user_to_m2m()' to work with 'UserCollection' * added field 'lastRecommendTime' in 'indicator.models.UserIndicator' * updated 'indicator.views.indicator_status' against 'recommend_indicator' *** qtip2 for recommended indicator *** * added 'qtip2' tooltip for recommended indicator card * added '97suifang' qtip css (qtip-sf) * added tooltip for 'add record' when return error (SheetDefault page); * improved the style of 'collection_btn' and 'go_library_btn' of IndexDesc page;
Diffstat (limited to '97suifangqa/apps/sciblog/urls.py')
-rw-r--r--97suifangqa/apps/sciblog/urls.py25
1 files changed, 19 insertions, 6 deletions
diff --git a/97suifangqa/apps/sciblog/urls.py b/97suifangqa/apps/sciblog/urls.py
index 722984b..47559d4 100644
--- a/97suifangqa/apps/sciblog/urls.py
+++ b/97suifangqa/apps/sciblog/urls.py
@@ -1,7 +1,10 @@
+# -*- coding: utf-8 -*-
+
from django.conf.urls import patterns, url
-from .models import SciBlog, BlogAnnotation
-from .views import *
+from sciblog.models import SciBlog, BlogAnnotation
+from sciblog.views import *
+
blog_blocks = '|'.join(['source','abstract', 'knowledge','follow', 'results', 'comment','refrences', 'test','results-detail'])
urlpatterns = patterns('',
@@ -11,7 +14,17 @@ urlpatterns = patterns('',
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}),
- )
+ url(r'^(?P<objid>\d+)/collect/?$',
+ add_user_to_m2m,
+ name='blog_collect',
+ kwargs={'m2m':'collected_by', 'model': SciBlog}),
+ url(r'^(?P<objid>\d+)/understand/?$',
+ add_user_to_m2m,
+ name='blog_understood',
+ kwargs={'m2m':'catched_by', 'model': SciBlog}),
+ url(r'^annotation/(?P<objid>\d+)/collect/?$',
+ add_user_to_m2m,
+ name='annotation_collect',
+ kwargs={'m2m':'collected_by', 'model': BlogAnnotation}),
+)
+