I'm finish cleaning my project. I remove not useful apps and codes then I arrange them. After this I encountered error
TypeError: object of type 'instancemethod' has no len()
so I change it to count() but I encountered error again
AttributeError: 'function' object has no attribute 'count'
Here is my code:
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
I think I delete something here that's why I'm getting the error
You forgot to put ()
 envelopes = Envelope.objects.filter(user=request.user).exclude_unallocated()
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With