<s> from rest_framework_extensions . etag . decorators import etag <EOL> from rest_framework_extensions . settings import extensions_api_settings <EOL> class BaseETAGMixin ( object ) : <EOL> object_etag_func = extensions_api_settings . DEFAULT_OBJECT_ETAG_FUNC <EOL> list_etag_func = extensions_api_settings . DEFAULT_LIST_ETAG_FUNC <EOL> class ListETAGMixin ( BaseETAGMixin ) : <EOL> @ etag ( etag_func = '<STR_LIT>' ) <EOL> def list ( self , request , * args , ** kwargs ) : <EOL> return super ( ListETAGMixin , self ) . list ( request , * args , ** kwargs ) <EOL> class RetrieveETAGMixin ( BaseETAGMixin ) : <EOL> @ etag ( etag_func = '<STR_LIT>' ) <EOL> def retrieve ( self , request , * args , ** kwargs ) : <EOL> return super ( RetrieveETAGMixin , self ) . retrieve ( request , * args , ** kwargs ) <EOL> class UpdateETAGMixin ( BaseETAGMixin ) : <EOL> @ etag ( etag_func = '<STR_LIT>' , rebuild_after_method_evaluation = True ) <EOL> def update ( self , request , * args , ** kwargs ) : <EOL> return super ( UpdateETAGMixin , self ) . update ( request , * args , ** kwargs ) <EOL> class DestroyETAGMixin ( BaseETAGMixin ) : <EOL> @ etag ( etag_func = '<STR_LIT>' ) <EOL> def destroy ( self , request , * args , ** kwargs ) : <EOL> return super ( DestroyETAGMixin , self ) . destroy ( request , * args , ** kwargs ) <EOL> class ReadOnlyETAGMixin ( RetrieveETAGMixin , <EOL> ListETAGMixin ) : <EOL> pass <EOL> class ETAGMixin ( RetrieveETAGMixin , <EOL> UpdateETAGMixin , <EOL> DestroyETAGMixin , <EOL> ListETAGMixin ) : <EOL> pass </s>
