test/ with url_for( )

watermarks_url_path
Castro0o 5 years ago
parent dc73be8811
commit 5c1002b5a0

@ -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/uploadbook
* http://127.0.0.1/watermarks/about * http://127.0.0.1/watermarks/about
* added pages /test and * added page /test `watermarks/test` for testing url_for() - correct
* made urls relative
* make urls relative

@ -12,7 +12,7 @@
<dl> <dl>
<dt id="indexabout">ov73e3lxezo2klxva2frlzqbb2usiozqbe56xiochvz5lznpkk6kw4ad.onion</dt> <dt id="indexabout">ov73e3lxezo2klxva2frlzqbb2usiozqbe56xiochvz5lznpkk6kw4ad.onion</dt>
</dl> </dl>
<h1>404</h1>
<h1>TACTICAL WATERMARKS<br>ON TOR BROWSER!</h1> <h1>TACTICAL WATERMARKS<br>ON TOR BROWSER!</h1>
</div> </div>

@ -15,6 +15,15 @@ app.secret_key = 'PiracyIsCool'
now = datetime.datetime.now() now = datetime.datetime.now()
@app.route('/test', methods=['GET'])
def test():
index = url_for('index')
about = url_for('about')
links = f"<a href='{index}'>index</a><br/><a href='{about}'>about</a>"
return links
@app.route('/', methods=['GET']) @app.route('/', methods=['GET'])
def index(): def index():
return render_template("public/index.html") return render_template("public/index.html")

Loading…
Cancel
Save