#NEWLINE# def get_url( self , action , obj = None , domain = True ) : #NEWLINE# #INDENT# "\n        Returns an RFC3987 IRI for a HTML representation of the given object, action.\n        If domain is true, the current site's domain will be added.\n        " #NEWLINE# if ( not obj ) : #NEWLINE# #INDENT# url = reverse ( 'actstream_detail' , None , ( action . pk , ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if hasattr ( obj , 'get_absolute_url' ) : #NEWLINE# #INDENT# url = obj . get_absolute_url ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ctype = ContentType . objects . get_for_model ( obj ) #NEWLINE# url = reverse ( 'actstream_actor' , None , ( ctype . pk , obj . pk ) ) #NEWLINE# #UNINDENT# #UNINDENT# if domain : #NEWLINE# #INDENT# return add_domain ( Site . objects . get_current ( ) . domain , url ) #NEWLINE# #UNINDENT# return url