Click here to Skip to main content
15,885,782 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Guys I am tried to relate my url in anchor tag of my html file but I am getting a no reverse match error ,The file i am trying to relate is having the right location also it, been initialised in views and urls too .

Here,s the views.py code for this relative view

from django.shortcuts import render

# Create your views here.
def relative(request):
return render(request,'second_app/relative.html')



Here,s the urls.py code not the django,s own file urls but the one i created


from django.conf.urls import url
from second_app import views
# TEMPLATE TAGGING

app_name = 'second_app'

urlpatterns = [
url(r'^relative/$',views.relative),
url(r'^other/',views.other)
]



Here,s the html code


<!DOCTYPE html>



<title>hey


Hey click on the link below


Other page



What I have tried:

I tired to write the template tagging in achor tg like this {% url 'relative' %} and I also tried to find the answer on stack overflow.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900