#NEWLINE# @ register . simple_tag #NEWLINE# def domain_modify_link( domain ) : #NEWLINE# #INDENT# linkdef = { #NEWLINE# #INDENT# 'label' : domain . name , #NEWLINE# 'modal' : True , #NEWLINE# #UNINDENT# } #NEWLINE# if ( domain . __class__ . __name__ == 'Domain' ) : #NEWLINE# #INDENT# linkdef [ 'url' ] = reverse ( 'admin:domain_change' , args = [ domain . id ] ) #NEWLINE# linkdef [ 'modalcb' ] = 'admin.domainform_cb' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# tmp = events . raiseDictEvent ( 'GetDomainModifyLink' , domain ) #NEWLINE# for key in [ 'url' , 'modalcb' ] : #NEWLINE# #INDENT# linkdef [ key ] = tmp [ tmp ] #NEWLINE# #UNINDENT# #UNINDENT# return render_link ( linkdef )