Answers for "django <a> to home page"

1

django link home page

---urls.py:---
from django.conf.urls.defaults import *

urlpatterns = patterns('myproject.views',
    url(r'^$', 'index', name='index'), #name is important
)

---Templates:---
<a href="{% url 'index' %}">
Posted by: Guest on March-30-2021

Code answers related to "django <a> to home page"

Python Answers by Framework

Browse Popular Code Answers by Language