# HG changeset patch # User k0s # Date 1256942950 14400 # Node ID 7cdb3eecc04598a4a53db72756f81f7026b136de # Parent 1554cb56aa2f66e5bdfd7d7aa56254b99228d34e make post form genshi diff -r 1554cb56aa2f -r 7cdb3eecc045 bitsyblog/bitsyauth.py --- a/bitsyblog/bitsyauth.py Sun Oct 25 21:36:33 2009 -0400 +++ b/bitsyblog/bitsyauth.py Fri Oct 30 18:49:10 2009 -0400 @@ -187,7 +187,7 @@ def login_form(self, referer=None, action=None): if action is None: action = self.urls['login'] - form = Form(action=action, submit='Login') + form = Form(action='', submit='Login') form.add_element('textfield', 'Name', input_name='username') form.add_element('password', 'Password', input_name='password') if referer is not None: diff -r 1554cb56aa2f -r 7cdb3eecc045 bitsyblog/bitsyblog.py --- a/bitsyblog/bitsyblog.py Sun Oct 25 21:36:33 2009 -0400 +++ b/bitsyblog/bitsyblog.py Fri Oct 30 18:49:10 2009 -0400 @@ -783,6 +783,18 @@ ### forms and accompanying display def form_post(self, request, user): + + # genshi data + self.site_nav(request) + data = request.environ['data'] + data['user'] = user + data['stylesheets'] = self.stylesheets(request) + data['user_url'] = self.user_url + + # render the template + template = self.loader.load('post.html') + return template.generate(**data).render() + retval = StringIO() print >> retval, '
' % self.user_url(request, user) print >> retval, '
' diff -r 1554cb56aa2f -r 7cdb3eecc045 bitsyblog/templates/post.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bitsyblog/templates/post.html Fri Oct 30 18:49:10 2009 -0400 @@ -0,0 +1,22 @@ + + + + post - ${user} + + + + + + +
+ public + secret + private + + + +