“Django REST Framework: ‘module’ object is not callable”
This post is more of a note to myself, but, I’m throwing it up here as a benefit to myself and my brethren who end up making the same mistake.
If you ever encounter an error that reads: 'module' object is not callable
, while using the reverse()
function, you are using the wrong import!
Wrong:
from rest_framework import reverse
Correct:
from rest_framework.reverse import reverse