test rendering

thumb
km0 2 years ago
parent 50da1a5181
commit f8b2ee3cdc

@ -47,7 +47,7 @@ def get_md_contents(filename, directory='./contents'):
def render_home():
print('Rendering home...')
with open(app.root_path + 'render.html', 'w') as f:
with open('/home/kamo/public_html/render.html', 'w') as f:
# get the basic info of the website from the /contents/home.md file
meta, content = get_md_contents("home.md")
projects_list = []
@ -136,7 +136,7 @@ def pull():
if request.method == 'POST':
subprocess.call(['sh', '/home/kamo/public_html/update.sh'])
with open(app.root_path + '/log.txt', 'a') as f:
with open('/home/kamo/public_html/log.txt', 'a') as f:
f.write(request.form['payload'])
print(request.form['payload'])
@ -152,5 +152,7 @@ def render():
render_home()
return redirect(url_for('home_page'))
# RUN
app.run(port="3132")

Loading…
Cancel
Save