#NEWLINE# def get_schema( self ) : #NEWLINE# #INDENT# '\n        Retrieves the currently active schema, taking into account dynamic typing\n        ' #NEWLINE# schema = None #NEWLINE# if self . dotpath ( ) : #NEWLINE# #INDENT# field = self . get_field ( ) #NEWLINE# if getattr ( field , 'subfield' , None ) : #NEWLINE# #INDENT# field = field . subfield #NEWLINE# #UNINDENT# if getattr ( field , 'schema' ) : #NEWLINE# #INDENT# schema = field . schema #NEWLINE# if schema . _meta . typed_field : #NEWLINE# #INDENT# typed_field = self . _meta . fields [ schema . _meta . typed_field ] #NEWLINE# if self . request . GET . get ( schema . _meta . typed_field , False ) : #NEWLINE# #INDENT# key = self . request . GET [ schema . _meta . typed_field ] #NEWLINE# schema = typed_field . schemas [ key ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# obj = self . get_active_object ( ) #NEWLINE# if ( ( obj is not None ) and isinstance ( obj , Schema ) ) : #NEWLINE# #INDENT# schema = type ( obj ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# assert False #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# schema = self . get_base_schema ( ) #NEWLINE# #UNINDENT# assert issubclass ( schema , Schema ) #NEWLINE# return schema