Django url not calling particular view function
Particular View function couldn't be called from urls.py
views.py
is:
def commentView(request):
print('Function exectuted') #Not printing anything on the terminal
return redirect(request. META['HTTP_REFERER'])
urls.py
is:
app_name = "backend"
urlpatterns = [
path('login/', views.loginView, name='login') #Not relevant
path('login/comment/', views.commentView, name = 'comment'),
inbox.html
is:
<form class="comment-box" action="{% url 'backend:comment' %}" method="get">
...
</form>
So I want to call commentView
in views.py
from inbox.html
through urls.py
No particular error was raised but print statement was not executed
What should i call from action tag?
Where have i been wrong?