Hi,
username dalaylama00.
My issue is that I have been trying to render some initial parameters to a html file, get data from the user and run it on the server side. Getting data from the client through json works just fine, but I cannot render the default parameters to the index.html. When I start the server, the browser shows literally the placeholders in the index.html file, as an example, instead of rendering 2000-01-31 , it shows {{start_time}}, which is the placeholder in the index.html file. By the way, this is working without any issues under my local server, by using native cherrypy server. Any help is appreciated:
Here is the portion that I think is not working:
enviro = Environment(loader=FileSystemLoader(env.path+os.sep+'html5up-strata'))
tmpl = enviro.get_template('index.html')
defaults={'title':'BON', 'lege_data':'\"\"', 'start_time':"2000-01-31",'end_time':"2000-02-10",\
'plot_header':'<p>generate plots.</p>',\
'jtype':'11'}
class Strata(object):
@cherrypy.expose
def index(self, params={}):
if (not params):
return tmpl.render(defaults)
else:
return tmpl.render(params)