say this is my url:
url(r'^$', mainApp_views.homepage),
Is it possible to check this text = "mainApp_views.homepage" in view and middleware ?
Thanks in advance,
You want something like
from django.urls import resolve
def your_view(request):
# resolve the url from the path
url_name = resolve(request.path).url_name
You will probably want to add names to your urls too name='home'
from django.urls import resolve nowadays.