1👍
✅
The method should take two parameters; self
: MyModelAdmin
instance, obj
: MyModel
instance.
Replacing my_method
as following will solve your problem:
def my_method(self, obj):
return obj.get_some_info()
- [Answered ]-Unable to update a Class Model in Django
- [Answered ]-Why I can not get cookies from requests.get
- [Answered ]-Django Admin how to change text in relations field
- [Answered ]-Send data through get method to a TemplateView in Django
- [Answered ]-Can't set expire header on images with Apache
Source:stackexchange.com