Skip to content

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

Closed
@sublee

Description

@sublee

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions