#NEWLINE# @ staticmethod #NEWLINE# def action_check_host( request ) : #NEWLINE# #INDENT# hostname = extract_url_hostname ( hostname [ 'host' ] ) #NEWLINE# try : #NEWLINE# #INDENT# is_active = Host . get ( ( Host . hostname == hostname ) ) . is_active #NEWLINE# #UNINDENT# except DoesNotExist : #NEWLINE# #INDENT# is_active = False #NEWLINE# #UNINDENT# return { #NEWLINE# #INDENT# 'result' : ( 'active' if is_active else 'inactive' ) , #NEWLINE# 'host' : request [ 'host' ] , #NEWLINE# #UNINDENT# }