Mercurial > genshi > mirror
comparison 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 |
comparison
equal
deleted
inserted
replaced
613:1e6cf366b944 | 615:06165fee45ab |
---|---|
6 <head> | 6 <head> |
7 <title>News</title> | 7 <title>News</title> |
8 </head> | 8 </head> |
9 <body> | 9 <body> |
10 <h1>News</h1> | 10 <h1>News</h1> |
11 <p><a href="/submit/">Submit new link</a></p> | 11 <p><a href="${url('/submit/')}">Submit new link</a></p> |
12 | 12 |
13 <ol py:if="submissions" class="submissions"> | 13 <ol py:if="submissions" class="submissions"> |
14 <li py:for="submission in submissions"> | 14 <li py:for="submission in submissions"> |
15 <a href="${submission.url}">${submission.title}</a> | 15 <a href="${submission.url}">${submission.title}</a> |
16 posted by ${submission.username} | 16 posted by ${submission.username} |
17 at ${submission.time.strftime('%M/%d/%Y %H:%m')}<br /> | 17 at ${submission.time.strftime('%M/%d/%Y %H:%m')}<br /> |
18 <div class="info"> | 18 <div class="info"> |
19 <a href="/info/${submission.code}/">${len(submission.total_comments)} comments</a> | 19 <a href="${url('/info/%s/' % submission.code)}"> |
20 ${len(submission.total_comments)} comments | |
21 </a> | |
20 </div> | 22 </div> |
21 </li> | 23 </li> |
22 </ol> | 24 </ol> |
23 </body> | 25 </body> |
24 </html> | 26 </html> |