use update_wrapper from builtin functools module to be compatible with django 1.6