#NEWLINE# @ register . simple_tag #NEWLINE# def openid_icon( openid , user ) : #NEWLINE# #INDENT# oid = ( '%s' % openid ) #NEWLINE# matches = [ ( u . openid == oid ) for u in UserOpenidAssociation . objects . filter ( user = user ) ] #NEWLINE# if any ( matches ) : #NEWLINE# #INDENT# return mark_safe ( ( '<img src="%s" alt="%s" />' % ( os . path . join ( settings . STATIC_URL , 'images' , 'openid-icon.png' ) , ugettext ( 'Logged in with OpenID' ) ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ''