2
방금 django 모델에 몇 가지 문제가 있습니다.모델 내부의 관련 객체에 대한 액세스
>>> a.total_items
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "models.py", line 49, in _total_items
for i in self.item_set.all:
TypeError: 'RelatedManager' object is not callable
그냥 Item.objects.filter (cart = self.pk)를 사용하여 (매우 나쁨) 해결 방법을 찾았지만 ... 정말 좋아하지 않아요. – LoG