Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sublee opened this issue Aug 20, 2010 · 3 comments
Closed

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

sublee opened this issue Aug 20, 2010 · 3 comments

Comments

@sublee
Copy link

@sublee 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.

@mitsuhiko
Copy link
Member

@mitsuhiko mitsuhiko commented Aug 20, 2010

Added testcase. This closed by 2a73bbc

@mitsuhiko
Copy link
Member

@mitsuhiko mitsuhiko commented Aug 20, 2010

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

@sublee
Copy link
Author

@sublee sublee commented Aug 20, 2010

@mitsuhiko

Thanks!

kennethreitz pushed a commit that referenced this issue Apr 17, 2011
kennethreitz pushed a commit that referenced this issue Apr 17, 2011
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants