#NEWLINE# def get( self ) : #NEWLINE# #INDENT# entity_id = self . get_argument ( 'entity_id' , default = None , strip = True ) #NEWLINE# if ( not entity_id ) : #NEWLINE# #INDENT# raise web . HTTPError ( 400 , 'entity_id required' ) #NEWLINE# #UNINDENT# user = self . get_user_by_session_key ( self . get_argument ( 'session_key' , default = None , strip = True ) ) #NEWLINE# user_id = None #NEWLINE# if user : #NEWLINE# #INDENT# user_id = user . get ( 'id' ) #NEWLINE# if ( not user_id ) : #NEWLINE# #INDENT# only_public = True #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# only_public = True #NEWLINE# #UNINDENT# result = entity . get_allowed_childs ( entity_id ) #NEWLINE# if ( not result ) : #NEWLINE# #INDENT# return self . missing ( ) #NEWLINE# #UNINDENT# self . write ( json . dumps ( result , cls = JSONDateFix ) )