summaryrefslogtreecommitdiff
path: root/gstudio/templatetags/gstudio_tags.py
diff options
context:
space:
mode:
authorAnkita <ankita@ankita-Inspiron-N5010.(none)>2012-07-13 12:31:27 +0530
committerAnkita <ankita@ankita-Inspiron-N5010.(none)>2012-07-13 12:31:27 +0530
commit527ab688a8608ded5fc854cf8641228181efa981 (patch)
tree825f17422ce610922f8f34854c5e54db7a7f35ad /gstudio/templatetags/gstudio_tags.py
parentef3793b349be5744d6ef98a034f0c009159ed85b (diff)
downloadgnowsys-527ab688a8608ded5fc854cf8641228181efa981.tar.gz
this patch was added for metastudio by BITS Pilani team in 2012.
Diffstat (limited to 'gstudio/templatetags/gstudio_tags.py')
-rw-r--r--gstudio/templatetags/gstudio_tags.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/gstudio/templatetags/gstudio_tags.py b/gstudio/templatetags/gstudio_tags.py
index 47dbbff7..d4152f5e 100644
--- a/gstudio/templatetags/gstudio_tags.py
+++ b/gstudio/templatetags/gstudio_tags.py
@@ -45,6 +45,7 @@ from gstudio.comparison import VectorBuilder
from gstudio.comparison import pearson_score
from gstudio.templatetags.zcalendar import GstudioCalendar
from gstudio.templatetags.zbreadcrumbs import retrieve_breadcrumbs
+from django.http import HttpResponseRedirect
register = Library()
@@ -342,6 +343,12 @@ def get_tags(parser, token):
"first argument to get_tags tag must be 'as'")
return TagsNode(bits[2])
+@register.simple_tag
+def redirect(username):
+ link = "/"
+ return HttpResponseRedirect(link)
+
+
@register.inclusion_tag('gstudio/tags/dummy.html')
def get_tag_cloud(steps=6, template='gstudio/tags/tag_cloud.html'):
@@ -350,3 +357,7 @@ def get_tag_cloud(steps=6, template='gstudio/tags/tag_cloud.html'):
Nodetype.published.all(), counts=True)
return {'template': template,
'tags': calculate_cloud(tags, steps)}
+
+@register.inclusion_tag('gstudio/tags/comment.html')
+def show_comment(comment,idusr,flag,admin_id,attob):
+ return {'comment':comment , 'idusr' : idusr, "flag" : flag, "admin_id" : admin_id , "attribute" : attob}