Chapter 5.4. Tying Everything Together
Because we’re redirecting everybody to the index method, we probably ought to create one. So, here goes:
<body> <h2><a href="/list_by_category">Bookmarks by Category</a></h2> <h2><a href="/list">All Bookmarks</a></h2> <h2><a href="/bookmarks/add">Add New Link</a></h2> </body>
This is just plain HTML, but it uses the bookmark, list, and list_by_categories URLs that we defined earlier. Before we finish things off, we really need to add a link to each of our bookmarks in the /list page that will allow a user to edit that bookmark:
<body> <ul> <li py:for="bookmark in bookmarks"> <a href="${bookmark.link}"> <span py:replace="bookmark.bookmarkName">Link to Bookmark</span> </a> -- <span py:replace="bookmark.description">Description ...
Get Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.