Does Sanic have a function 'url_for ()' (for example, in a bulb)?

I am trying to connect a simple flash application to sanic while working with an example for sanic and jinja .

Does sanic have url_for() function like a bulb?

+5
source share
2 answers

Update : Sanic 0.3.1 adds url_for() support:

 url = app.url_for('post_handler', post_id=5, arg_one='one', arg_two='two') 

No. Currently, sanic router is very simple and does not support searching. You can view the short source code here: https://github.com/channelcat/sanic/blob/master/sanic/router.py

+6
source

Now sanit support url_for method

resource code

+2
source

Source: https://habr.com/ru/post/1261929/


All Articles