1👍
✅
Seems like a simple function name collision. Your view method name is all
and you’re calling all(request)
again and again, and again 🙂 if the value of submit == all
.
Using in
to look for the value of submit in request.POST seems odd. Why not just set the value once and compare it that way?
submit = request.POST['submit']
if submit == 'all':
# call method
elif submit == 'addtype':
# etc
Source:stackexchange.com