Mercurial > genshi > mirror
diff examples/tutorial/geddit/templates/index.html @ 615:06165fee45ab trunk
GenshiTutorial: make URLs dynamic so that the app could theoretically be mounted on some other SCRIPT_NAME.
author | cmlenz |
---|---|
date | Wed, 29 Aug 2007 20:12:54 +0000 |
parents | 236c351928a2 |
children | b6706f9346ac |
line wrap: on
line diff
--- a/examples/tutorial/geddit/templates/index.html +++ b/examples/tutorial/geddit/templates/index.html @@ -8,7 +8,7 @@ </head> <body> <h1>News</h1> - <p><a href="/submit/">Submit new link</a></p> + <p><a href="${url('/submit/')}">Submit new link</a></p> <ol py:if="submissions" class="submissions"> <li py:for="submission in submissions"> @@ -16,7 +16,9 @@ posted by ${submission.username} at ${submission.time.strftime('%M/%d/%Y %H:%m')}<br /> <div class="info"> - <a href="/info/${submission.code}/">${len(submission.total_comments)} comments</a> + <a href="${url('/info/%s/' % submission.code)}"> + ${len(submission.total_comments)} comments + </a> </div> </li> </ol>