When I call url_for('index')
it will generate '/'
but there are times where I'd like it to generate 'domain.tld/'
instead. I can't find in the documentation where I would specify this. Do I just need to do 'domain.tld/%s' % url_for('index')
?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
url_for
takes an_external
keyword argument that will return an absolute (rather than relative) URL. I believe you will need to set aSERVER_NAME
config key with your root domain to make it work correctly.