Try to import update_wrapper from functools first

```update_wrapper``` was removed from django.utils.functional in 1.6 (https://github.com/django/django/commit/876fc391) as it's part of the standard library in Python 2.5+.