Top "Url-for" questions

url_for is a function present in web frameworks like Rails and Flask, used to get the URL for a given route.

Creating link to an url of Flask app in jinja2 template

In my Flask app, I have a view which displays a post @post_blueprint.route('/post/<int:year&…

python flask jinja2 url-for
rails get app root/base url

In my app I have a few APIs that under api domain. Now in one of the API I want …

ruby-on-rails ruby-on-rails-3 rails-routing url-for
Build error with variables and url_for in Flask

Have found one or two people on the interwebs with similar problems, but haven't seen a solution posted anywhere. I'm …

python flask werkzeug build-error url-for
how to use Flask Jinja2 url_for with multiple parameters

I have a problem while using jinja2 url_for() function. I have a route like this: @app.route('/article/&…

python flask jinja2 url-for
Flask url_for URLs in Javascript

What is the recommended way to create dynamic URLs in Javascript files when using flask? In the jinja2 templates and …

javascript python flask url-for
Where do I define the domain to be used by url_for() in Flask?

When I call url_for('index') it will generate '/' but there are times where I'd like it to …

python flask url-for
Query parameters with url_for?

url_for([:edit, @post]) is working and generating /comments/123/edit. Now I need to add a query parameter, so that …

ruby-on-rails ruby-on-rails-3 query-parameters url-for
Rails: generate a full URL in an ActionMailer view

I'm using ActionMailer to send a sign up confirmation email. The email needs to contain a link back to the …

ruby-on-rails actionmailer host url-for
How to load a javascript or css file into a BottlePy template?

I am trying to return a html template with BottlePy. And this works fine. But if I insert a javascript …

javascript python templates bottle url-for
Flask (Python): Pass input as parameter to function of different route with fixed URL

How do I get the user input submitted on the form to be displayed on a fixed URL? @app.route(…

python redirect flask routes url-for