您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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