You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

decorators.py 349B

1234567891011
  1. import warnings
  2. def deprecated(f):
  3. def _deprecated(*args, **kwargs):
  4. message = "Method '%s' is deprecated and will be " \
  5. "removed in the next major version of django-oscar" \
  6. % f.__name__
  7. warnings.warn(message, DeprecationWarning, stacklevel=2)
  8. return f(*args, **kwargs)
  9. return _deprecated