<s> from functools import wraps , update_wrapper <EOL> from base import View <EOL> from list import ListView <EOL> from detail import DetailView <EOL> def method_decorator ( decorator ) : <EOL> """<STR_LIT>""" <EOL> def _dec ( func ) : <EOL> def _wrapper ( self , * args , ** kwargs ) : <EOL> def bound_func ( request , * args2 , ** kwargs2 ) : <EOL> return func ( self , * args2 , ** kwargs2 ) <EOL> return decorator ( bound_func ) ( self . request , * args , ** kwargs ) <EOL> return wraps ( func ) ( _wrapper ) <EOL> update_wrapper ( _dec , decorator ) <EOL> _dec . __name__ = '<STR_LIT>' % decorator . __name__ <EOL> return _dec </s>
