`url_for("static", ...)` with `subdomain` problem #108

sublee opened this Issue Aug 20, 2010 · 3 comments


None yet

2 participants

sublee commented Aug 20, 2010

The version is 0.6.

I made a flask.Module with subdomain option.

from flask import Module
app = Module(__name__, subdomain="sub")

And when I use url_for("static", ...) in a template, it returns "http://example.net/static" instead of "/static"("http://sub.example.net/static"). So I added some code for debugging to flask/app.py(line 512).

print options

Result is:

{'endpoint': 'static'}
{'subdomain': 'sub', 'endpoint': 'sub.favicon'}
{'subdomain': 'sub', 'endpoint': 'sub.index'}

The url rule for static, which is added automatically doesn't have a subdomain option.


Added testcase. This closed by 2a73bbc


Thanks a lot for that ticket and fix. I applied it for both master and 0.6-maintenance and added a testcase.

sublee commented Aug 20, 2010



This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment