Commit 9a79b113 authored by Daniel Niecke's avatar Daniel Niecke

fixing

parent 63bfed42
......@@ -49,4 +49,4 @@ CMD /usr/sbin/apache2ctl -D FOREGROUND
# docker build -t news-reader . ; docker rm -f news-reader ; docker run -d -e ENV=production -p 7777:80 --name news-reader news-reader
# docker run -d --name news-reader --net main_net --hostname news.niecke-it.de --env-file=env -e "LETSENCRYPT_HOST=news.niecke-it.de" -e "LETSENCRYPT_EMAIL=niecke@bwl.uni-kiel.de" -e "VIRTUAL_HOST=news.niecke-it.de" news-reader
\ No newline at end of file
# docker build -t news-reader . && docker rm -f news-reader && docker run -d --name news-reader --net main_net --hostname news.niecke-it.de --env-file=env news-reader
......@@ -41,14 +41,17 @@ def save_url():
"""
if app.config['DEBUG']:
engine = create_engine('sqlite:////azk/azk/test.db', echo=True)
#engine = create_engine('sqlite:////azk/azk/test.db', echo=True)
engine = None
else:
engine = create_engine('mysql://azk:{}@dbms.gruendung.bwl.uni-kiel.de/azk'.format(os.environ['MYSQL_PW']),
engine = create_engine('mysql://news_reader:{}@{}/news'.format(os.environ['MYSQL_PW'], os.environ['MYSQL_HOST']),
pool_pre_ping=True)
@app.route("/app", methods=['POST'])
def save_from_app():
if request.form.get("url") and request.form.get("key"):
outputFilename, title= parse_compu_wo.process_one_url(request.form.get("url"))
send_to_kindle(title, outputFilename, request.form.get("key"), engine)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment