Index: /main/waeup.cas/trunk/waeup/cas/server.py
===================================================================
--- /main/waeup.cas/trunk/waeup/cas/server.py	(revision 10606)
+++ /main/waeup.cas/trunk/waeup/cas/server.py	(revision 10607)
@@ -176,7 +176,23 @@
 
 def get_template(name):
+    """Read template named `name`.
+
+    Templates are looked up in the local `templates` dir.
+
+    In the result any 'PART_HEADER' and 'PART_FOOTER' parts are
+    replaced by the respective templates.
+
+    Returns the HTML template.
+    """
     path = os.path.join(template_dir, name)
     if os.path.isfile(path):
-        return open(path, 'r').read()
+        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())
+        return html
     return None
 
@@ -293,8 +309,5 @@
 
     def _get_template(self, name):
-        path = os.path.join(template_dir, name)
-        if os.path.isfile(path):
-            return open(path, 'r').read()
-        return None
+        return get_template(name)
 
     def login(self, req):
