diff bitsyblog/templates/blog.html @ 25:62c961bb91e6

* allow changing of privacy on blog entries * bind blog variables in genshi
author k0s <k0scist@gmail.com>
date Sat, 31 Oct 2009 00:30:47 -0400
parents 7505329b3134
children 4ac11f7992c6
line wrap: on
line diff
--- a/bitsyblog/templates/blog.html	Sat Oct 31 00:22:26 2009 -0400
+++ b/bitsyblog/templates/blog.html	Sat Oct 31 00:30:47 2009 -0400
@@ -36,11 +36,13 @@
 
     <!-- blog entries -->
     <div py:for="entry in blog"
-         id="${entry.datestamp()}" class="blog-entry">
+         py:with="datestamp=entry.datestamp(); url=user_url(request, request.user.name, datestamp)"
+         id="${entry.datestamp()}" 
+         class="blog-entry">
       <a name="${entry.datestamp()}" />
       
       <div class="subject">
-        <a href="${user_url(request, request.user.name, entry.datestamp())}">${subject % dict(date=entry.date.strftime(date_format))}</a>
+        <a href="${url}">${subject % dict(date=entry.date.strftime(date_format))}</a>
         <em py:if="entry.privacy == 'secret' and role == 'friend'">
           secret
         </em>
@@ -51,7 +53,7 @@
       <div py:if="role == 'author'">
 
         <!-- privacy settings -->
-        <form action="TODO" method="post">
+        <form action="${url}" method="post">
           <span title="viewable to everyone">
             public
             <input type="radio" name="privacy" value="public"