What is the difference in functionality between from django.utils.functional import wraps and from functools import wraps?
i m using django 1.3 and python 2.4.i want to remove sensitive information from post data but django.views.decorators.debug is available only in django 1.4.So i copy the source code and put in my project from https://bitbucket.org/orzel/django-1.4-production/src/507b10c2c0e3/django/views/decorators/debug.py. but this decorator uses functools which is not available in python 2.4.so i use django.utils.functional import wraps instead of from functools import wraps.But still the sensitive info appear in error mail? any suggestions?
I don’t think there is a difference. It is probably a backport for older Python versions which don’t support
functools.wraps.Edit
Actually since latest Django does not support any Python version anymore which does not support
functoolsI think its just left there for possible dependency issues (in Django or in Django projects). It is actually even importingfunctools.wrapsdirectly now: http://code.djangoproject.com/svn/django/trunk/django/utils/functional.py