diff options
author | Dhiru <dhiru@labadmin-P5E-Deluxe.(none)> | 2012-07-10 16:43:46 +0530 |
---|---|---|
committer | Dhiru <dhiru@labadmin-P5E-Deluxe.(none)> | 2012-07-10 16:43:46 +0530 |
commit | 784e62d0c38fbf0cc4b5e67e26354b0e0a261fc2 (patch) | |
tree | a48fde2a2a11bc16ce0eaa7c34aaffd065042e82 /gstudio | |
parent | c880d7f66b4fdbdb6369eefb55d8bbe912bcc66e (diff) | |
download | gnowsys-784e62d0c38fbf0cc4b5e67e26354b0e0a261fc2.tar.gz |
changes done in gstudio_tags.py
Diffstat (limited to 'gstudio')
-rw-r--r-- | gstudio/templatetags/gstudio_tags.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gstudio/templatetags/gstudio_tags.py b/gstudio/templatetags/gstudio_tags.py index 47dbbff..5c3c8a8 100644 --- a/gstudio/templatetags/gstudio_tags.py +++ b/gstudio/templatetags/gstudio_tags.py @@ -217,6 +217,17 @@ def get_calendar_nodetypes(context, year=None, month=None, def get_recent_comments(number=5, template='gstudio/tags/recent_comments.html'): """Return the most recent comments""" # Using map(smart_unicode... fix bug related to issue #8554 + + comments = get_comment_model().objects.filter(is_public=True).order_by('-submit_date')[:number] + + return {'template': template, + 'comments': comments} + + +@register.inclusion_tag('gstudio/tags/dummy.html') +def get_recent_oldcomments(number=5, template='gstudio/tags/recent_comments.html'): + """Return the most recent comments""" + # Using map(smart_unicode... fix bug related to issue #8554 nodetype_published_pks = map(smart_unicode, Nodetype.published.values_list('id', flat=True)) content_type = ContentType.objects.get_for_model(Nodetype) @@ -229,7 +240,6 @@ def get_recent_comments(number=5, template='gstudio/tags/recent_comments.html'): return {'template': template, 'comments': comments} - @register.inclusion_tag('gstudio/tags/dummy.html') def get_recent_linkbacks(number=5, template='gstudio/tags/recent_linkbacks.html'): |