Anonymous user
Django for Designers: Difference between revisions
→Get views.py to talk to our models
imported>Paulproteus (→Curriculum: Add part 5 link) |
|||
Line 664:
</source>
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 bookmarks.models import Bookmark, Tag
</source>
And alter the tag() definition as well:
<source lang="python">
def tag(request, tag_name):
tag = Tag.objects.get(slug=tag_name)
|