forked from pavgup/ubertool_cts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
34 lines (30 loc) · 1.49 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 03 13:30:41 2012
@author: jharston
"""
import os
os.environ['DJANGO_SETTINGS_MODULE']='settings'
import webapp2 as webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import template
class defaultPage(webapp.RequestHandler):
def get(self):
text_file1 = open('main_description.txt','r')
x = text_file1.read()
text_file2 = open('main_text.txt','r')
xx = text_file2.read()
templatepath = os.path.dirname(__file__) + '/templates/'
html = template.render(templatepath+'01cts_uberheader_main.html', {'title':'cts - Chemical Transformation Simulator'})
html = html + template.render(templatepath+'02cts_uberintroblock_nomodellinks.html', {'title2':'Ecological Risk Web Applications','title3':x})
html = html + template.render (templatepath + '03cts_ubertext_links_left.html', {})
html = html + template.render (templatepath+'04ubertext_start_index.html', {'text_paragraph':xx})
html = html + template.render (templatepath+'04ubertext_end.html',{})
html = html + template.render (templatepath+'05cts_ubertext_links_right.html', {})
html = html + template.render(templatepath+'06cts_uberfooter.html', {'links': ''})
self.response.out.write(html)
app = webapp.WSGIApplication([('/.*', defaultPage)], debug=True)
def main():
run_wsgi_app(app)
if __name__ == '__main__':
main()