I'm trying to port a simple flask app to sanic, working with the example for sanic and jinja.
Does sanic have a url_for()
function like flask?
Update: Sanic 0.3.1 adds support for url_for()
:
url = app.url_for('post_handler', post_id=5, arg_one='one', arg_two='two')
No. Currently sanic's router is very basic and does not support lookups. You can review the short source code here: https://github.com/channelcat/sanic/blob/master/sanic/router.py
Now the sanic support url_for
method
resource code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With