Мне не удается получить доступ к функции в моем менеджере моделей.
models.py
class ChargeManager(models.Manager):
def dorefundcharge(self, charge_id):
print(charge_id)
class Charge(models.Model):
charge_id = models.CharField(max_length=120)
objects = ChargeManager()
views.py
charge_id = 1234
refund_of_charge = charge.dorefundcharge(charge_id)
Ошибка
AttributeError at /accounts/profile/refundcharge/540/
'Charge' object has no attribute 'dorefundcharge'