Right now in my templates I hardcore the links in my navigation like the following:
`base.html`
<a href="/about">About</a>
<a href="/contact">Contact</a>
<!-- etc -->
In my urls.py
urlpatterns = patterns('',
url(r'^about/$', TemplateView.as_view(template_name='pages/about.html'), name='about'),
url(r'^contact/$', TemplateView.as_view(template_name='pages/contact.html'), name='contact'),
)
Is there a way that in my base.html
file reference the urlpatterns from urls.py
so that anytime I change those, it reflects everywhere across my pages and templates?? Something like
<!-- what I would like to do -->
<a href="{{ reference_to_about_page }}">About</a>
<a href="{{ reference_to_contact_page }}">About</a>