#NEWLINE# def __init__( self , * args , **kwargs ) : #NEWLINE# #INDENT# self . request = args [ 'context' ] [ 'request' ] #NEWLINE# super ( DocumentSerializer , self ) . __init__ ( * args , ** kwargs ) #NEWLINE# if ( self . request . method . lower ( ) == 'get' ) : #NEWLINE# #INDENT# self . fields . pop ( 'file' ) #NEWLINE# if kwargs [ 'context' ] . get ( 'many' , False ) : #NEWLINE# #INDENT# self . fields . pop ( 'description' ) #NEWLINE# self . fields . pop ( 'sha1' ) #NEWLINE# self . fields . pop ( 'is_static' ) #NEWLINE# self . fields . pop ( 'modified' ) #NEWLINE# self . fields . pop ( 'created' )