code: def recent_comments(context):
      
      latest = context["settings"].COMMENTS_NUM_LATEST
      comments = ThreadedComment.objects.all().select_related("user")
      context["comments"] = comments.order_by("-id")[:latest]
      return context
docs: Dashboard widget for displaying recent comments.