プロジェクトのクリーニングを終了しました。役に立たないアプリやコードを削除して整理します。この後、エラーが発生しました
TypeError: object of type 'instancemethod' has no len()
count() に変更しましたが、再びエラーが発生しました
AttributeError: 'function' object has no attribute 'count'
これが私のコードです:
def budget(request):
envelopes = Envelope.objects.filter(
user=request.user).exclude_unallocated
return render(request, 'budget.html', {
'limit': account_limit(request, 15, envelopes),
}
def account_limit(request, value, query):
count_objects = len(query)
//other codes here
return result
ここで何かを削除したと思うので、エラーが発生しています