Import update_wrapper from its original location. Importing update_wrapper from django.utils.functional is depreciated in django 1.5 and fails in django 1.6. django 1.4's version of utils.functional.py imports update_wrapper from functools, so first try importing from there, then failover to importing from django.