url_for in flask code example
Example 1: default flask app
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Flask'
Example 2: flask url_for external
url_for(..., _external=True)
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Flask'
url_for(..., _external=True)