From 3d1a2ff9a151344bb6009a78a873f5356ecdc245 Mon Sep 17 00:00:00 2001 From: Benjamyn Date: Wed, 20 Feb 2019 21:20:13 +1100 Subject: [PATCH] Fixed for WSGI --- paste.py | 10 +++++----- templates/fuck.html | 1 + wsgi.py | 4 ++++ 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 templates/fuck.html create mode 100644 wsgi.py diff --git a/paste.py b/paste.py index 64e9ea1..360a494 100755 --- a/paste.py +++ b/paste.py @@ -56,10 +56,10 @@ doesDirExist() # https://paste.benjamyn.love/CBynvvjwDK -app = Flask(__name__) -app.config['DEBUG'] = False +application = Flask(__name__) +application.config['DEBUG'] = False -@app.route('/', methods=['POST', 'GET']) +@application.route('/', methods=['POST', 'GET']) def index(): printRealIP() if request.method == "GET": @@ -80,7 +80,7 @@ def index(): return method + hostedURL + name -@app.route('/') +@application.route('/') def getPaste(path): printRealIP() raw = False @@ -104,4 +104,4 @@ def getPaste(path): return render_template("read.html", data="No paste found") if __name__ == '__main__': - app.run(host='127.0.0.1') + application.run(host='127.0.0.1') diff --git a/templates/fuck.html b/templates/fuck.html new file mode 100644 index 0000000..c7accfb --- /dev/null +++ b/templates/fuck.html @@ -0,0 +1 @@ +
{{data|escape}}
diff --git a/wsgi.py b/wsgi.py new file mode 100644 index 0000000..f33560d --- /dev/null +++ b/wsgi.py @@ -0,0 +1,4 @@ +from paste import application + +if "__main__" == __name__: + application.run()