Index: /main/waeup.cas/trunk/waeup/cas/server.py
===================================================================
--- /main/waeup.cas/trunk/waeup/cas/server.py	(revision 10609)
+++ /main/waeup.cas/trunk/waeup/cas/server.py	(revision 10610)
@@ -22,4 +22,11 @@
 template_dir = os.path.join(os.path.dirname(__file__), 'templates')
 
+#: A piece of HTML that can be used in HTML headers.
+SHARED_HEADER = open(os.path.join(template_dir, 'part_header.tpl'), 'r').read()
+
+#: A piece of HTML that can be used in HTML footers.
+SHARED_FOOTER = open(os.path.join(template_dir, 'part_footer.tpl'), 'r').read()
+
+#: Seed random.
 RANDOM = random.SystemRandom(os.urandom(1024))
 
@@ -188,10 +195,6 @@
     if os.path.isfile(path):
         html = open(path, 'r').read()
-        html = html.replace(
-            'PART_HEADER',
-            open(os.path.join(template_dir, 'part_header.tpl'), 'r').read())
-        html = html.replace(
-            'PART_FOOTER',
-            open(os.path.join(template_dir, 'part_footer.tpl'), 'r').read())
+        html = html.replace('PART_HEADER', SHARED_HEADER)
+        html = html.replace('PART_FOOTER', SHARED_FOOTER)
         return html
     return None
