@library.global_function
def private_message(user):
 url = urlparams(reverse('messages.new'), to=user.username)
 msg = _('Private message')
 return Markup(u'<p class="pm"><a href="{url}">{msg}</a></p>'.format(url=url, msg=msg))

@ library . global_function def private_message ( user ) : url = urlparams ( reverse ( 'messages.new' ) , to = user . username ) msg = _ ( 'Private message' ) return Markup ( u'<p class="pm"><a href="{url}">{msg}</a></p>' . format ( url = url , msg = msg ) )
return a link to private message the user .