@register.simple_tag
def whiteboard_messages(project=None, subproject=None, language=None):
 ret = []
 whiteboards = WhiteboardMessage.objects.context_filter(project, subproject, language)
 for whiteboard in whiteboards:
  ret.append(render_to_string(u'message.html', {u'tags': u' '.join((whiteboard.category, u'whiteboard')), u'message': mark_safe(urlize(whiteboard.message, autoescape=True))}))
 return mark_safe(u'\n'.join(ret))

@ register . simple_tag def whiteboard_messages ( project = None , subproject = None , language = None ) : ret = [ ] whiteboards = WhiteboardMessage . objects . context_filter ( project , subproject , language ) for whiteboard in whiteboards : ret . append ( render_to_string ( u'message.html' , { u'tags' : u' ' . join ( ( whiteboard . category , u'whiteboard' ) ) , u'message' : mark_safe ( urlize ( whiteboard . message , autoescape = True ) ) } ) ) return mark_safe ( u'\n' . join ( ret ) )
displays whiteboard messages for given context .