class Foo():
@condition(last_modified_func=get_obj_mtime)
def retrieve(self, request, *args, **kwargs):
блаблабла
def condition(etag_func=None, last_modified_func=None):
def decorator(func):
@wraps(func, assigned=available_attrs(func))
def inner(request, *args, **kwargs):
# Get HTTP request headers
блаблабла