From 527ab688a8608ded5fc854cf8641228181efa981 Mon Sep 17 00:00:00 2001 From: Ankita Date: Fri, 13 Jul 2012 12:31:27 +0530 Subject: this patch was added for metastudio by BITS Pilani team in 2012. --- gstudio/templatetags/gstudio_tags.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gstudio/templatetags') 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} -- cgit v1.2.3-70-g09d2