I have a flask app in which there is a template with a form. It contain 2 options and when the user submit them. It generates a url like 

```
http://127.0.0.1:5000/search/?code=L00&option=cin

```

so i get both values like this:

```
ta = request.args.get('code', "", type=str)
tb = request.args.get('option', "", type=str)

```

now after some processing on it. I generate the result. There are many results so i have pagination applied to it. The problem is how do i form the url?

```
@app.route('/search/', defaults={'page': 1})
@app.route('/search/page/<int:page>')
def search(page):
    ta = request.args.get('code', "", type=str)
    tb = request.args.get('option', "", type=str)
    ***some processing ***

```

this won't work because `'/search/page/<int:page>'` this is not right. I need something like this 
`'/search/?code=L00&option=cin/page/<int:page>'`
Now how do i get this?
I tried this too while testing it:

```
with app.test_request_context():
    print url_for('search',code='L00',option='cin',page=3)

```

but it generates `/searcht/page/3?code=L00&option=cin`