In my case the problem was that I had outdated django-stronghold
installed (0.2.9). And even though in the code I had:
from django.urls import reverse
I still encountered the error. After I upgraded the version to django-stronghold==0.4.0
the problem disappeard.