hostname from settings.

This commit is contained in:
Jason Schwarzenberger
2020-11-11 09:46:27 +13:00
parent d588a60930
commit 3169af3002
3 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -70,7 +70,7 @@ def submit():
elif 'reddit.com' in parse.hostname and 'comments' in url:
source = 'reddit'
ref = parse.path.split('/')[4]
elif 'news.t0.vc' in parse.hostname:
elif settings.HOSTNAME in parse.hostname:
raise Exception('Invalid article')
else:
source = 'manual'
@@ -112,7 +112,7 @@ def story(sid):
def index():
return render_template('index.html',
title='Feed',
url='news.t0.vc',
url=settings.HOSTNAME,
description='Reddit, Hacker News, and Tildes combined, then pre-rendered in reader mode')
@flask_app.route('/<sid>', strict_slashes=False)