From 5c1002b5a0ec975b352eab909d4cbd97d27222eb Mon Sep 17 00:00:00 2001 From: Castro0o Date: Tue, 9 Jun 2020 17:22:19 +0200 Subject: [PATCH] test/ with url_for( ) --- README.md | 5 ++--- app/templates/public/404.html | 2 +- app/views.py | 9 +++++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cbeab41..8a0fa06 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,5 @@ But in the long run logging should be disabled * http://127.0.0.1/watermarks/uploadbook * http://127.0.0.1/watermarks/about -* added pages /test and - -* make urls relative +* added page /test `watermarks/test` for testing url_for() - correct +* made urls relative diff --git a/app/templates/public/404.html b/app/templates/public/404.html index 455f5c6..9b19082 100644 --- a/app/templates/public/404.html +++ b/app/templates/public/404.html @@ -12,7 +12,7 @@
ov73e3lxezo2klxva2frlzqbb2usiozqbe56xiochvz5lznpkk6kw4ad.onion
- +

404

TACTICAL WATERMARKS
ON TOR BROWSER!

diff --git a/app/views.py b/app/views.py index 97f16b9..54167e0 100644 --- a/app/views.py +++ b/app/views.py @@ -15,6 +15,15 @@ app.secret_key = 'PiracyIsCool' now = datetime.datetime.now() +@app.route('/test', methods=['GET']) +def test(): + index = url_for('index') + about = url_for('about') + links = f"index
about" + return links + + + @app.route('/', methods=['GET']) def index(): return render_template("public/index.html")