changeset 51:c7819dbf7733

allow files as headers
author k0s <k0scist@gmail.com>
date Sat, 26 Dec 2009 21:45:28 -0500
parents cf77bd13aad9
children 3ddb2ca12178
files bitsyblog/bitsyblog.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/bitsyblog/bitsyblog.py
+++ b/bitsyblog/bitsyblog.py
@@ -82,16 +82,18 @@ class BitsyBlog(object):
         if self.help_file and os.path.exists(self.help_file):
             help = file(self.help_file).read()
             self.help = docutils.core.publish_string(help,
                                                      writer_name='html',
                                                      settings_overrides={'report_level': 5})
 
         # header
         if self.header:
+            if os.path.exists(self.header):
+                self.header = file(self.header).read()
             self.header = Markup(self.header)
 
         # for BitsyAuth
         self.newuser = self.users.new
 
     ### methods dealing with HTTP
 
     def __call__(self, environ, start_response):