added decorator to allow decoration of functions which are members of class based views