- Timestamp:
- 10 Sep 2013, 15:06:04 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.cas/trunk/waeup/cas/server.py
r10607 r10610 22 22 template_dir = os.path.join(os.path.dirname(__file__), 'templates') 23 23 24 #: A piece of HTML that can be used in HTML headers. 25 SHARED_HEADER = open(os.path.join(template_dir, 'part_header.tpl'), 'r').read() 26 27 #: A piece of HTML that can be used in HTML footers. 28 SHARED_FOOTER = open(os.path.join(template_dir, 'part_footer.tpl'), 'r').read() 29 30 #: Seed random. 24 31 RANDOM = random.SystemRandom(os.urandom(1024)) 25 32 … … 188 195 if os.path.isfile(path): 189 196 html = open(path, 'r').read() 190 html = html.replace( 191 'PART_HEADER', 192 open(os.path.join(template_dir, 'part_header.tpl'), 'r').read()) 193 html = html.replace( 194 'PART_FOOTER', 195 open(os.path.join(template_dir, 'part_footer.tpl'), 'r').read()) 197 html = html.replace('PART_HEADER', SHARED_HEADER) 198 html = html.replace('PART_FOOTER', SHARED_FOOTER) 196 199 return html 197 200 return None
Note: See TracChangeset for help on using the changeset viewer.