@register.simple_tag(takes_context=True)
def comment_detail_display_hook(context, comment, render_mode):
 assert (render_mode in (u'review', u'text-email', u'html-email'))
 s = u''
 for hook in CommentDetailDisplayHook.hooks:
  try:
   if (render_mode == u'review'):
    s += hook.render_review_comment_detail(comment)
   elif (render_mode in (u'text-email', u'html-email')):
    s += hook.render_email_comment_detail(comment, (render_mode == u'html-email'))
  except Exception as e:
   extension = hook.extension
   logging.error(u'Error when running CommentDetailDisplayHook with render mode "%s" in extension: %s: %s', render_mode, extension.id, e, exc_info=1)
 return s

@ register . simple_tag ( takes_context = True ) def comment_detail_display_hook ( context , comment , render_mode ) : assert ( render_mode in ( u'review' , u'text-email' , u'html-email' ) ) s = u'' for hook in CommentDetailDisplayHook . hooks : try : if ( render_mode == u'review' ) : s += hook . render_review_comment_detail ( comment ) elif ( render_mode in ( u'text-email' , u'html-email' ) ) : s += hook . render_email_comment_detail ( comment , ( render_mode == u'html-email' ) ) except Exception as e : extension = hook . extension logging . error ( u'Error when running CommentDetailDisplayHook with render mode "%s" in extension: %s: %s' , render_mode , extension . id , e , exc_info = 1 ) return s
displays all additional detail from commentdetaildisplayhooks .