Django for Designers: Difference between revisions

(→‎Curriculum: Add part 5 link)
We also want our tag view to show real bookmarks. We only want to show bookmarks that have been tagged with the given tag. So we'll edit the import statement we just added:
<source lang="python">
from django.shortcuts import render
from bookmarks.models import Bookmark, Tag
And alter the tag() definition as well:
<source lang="python">
def tag(request, tag_name):
tag = Tag.objects.get(slug=tag_name)
Anonymous user