Error content:
类上的方法与独立函数完全不同,因此你不能应用函数装饰器到方法上——你需要先将
它转换为方法装饰器。method_decorator 装饰器转换函数装饰器为**防范**装饰器
,这样它就被用在实例方法上。举例:
Suggest modification:
类上的方法与独立函数完全不同,因此你不能应用函数装饰器到方法上——你需要先将
它转换为方法装饰器。method_decorator 装饰器转换函数装饰器为**方法**装饰器
,这样它就被用在实例方法上。举例:
end.
--
Ticket URL: <https://code.djangoproject.com/ticket/33913>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
Comment:
Thanks for the report, however, translations are handled at
[https://docs.djangoproject.com/en/dev/internals/contributing/localizing/#translations.
Transifex] and not in this tracker.
--
Ticket URL: <https://code.djangoproject.com/ticket/33913#comment:1>