Skip to content

Instantly share code, notes, and snippets.

@jherrlin
Last active December 16, 2015 10:48
Show Gist options
  • Save jherrlin/f5cac5e64858188d315c to your computer and use it in GitHub Desktop.
Save jherrlin/f5cac5e64858188d315c to your computer and use it in GitHub Desktop.
In template:
<li><a href="{% url 'ProjectsListView'%}">Projects</a></li>
In urls.py
url(r'^$', ProjectsListView.as_view(), name='ProjectsListView'),
Genom att använda "name" i url så kan man koppla den urlen till en länk i templaten.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment