Detect the endpoint when a URL is passed in an URL generator #21

Markus00000 opened this Issue Oct 18, 2012 · 1 comment


None yet
2 participants

Problem: MissingURLGeneratorWarning although a page has been frozen for the endpoint.


# Generate a feed
def feed(path):
    return feed

# Generate URLs for all feeds
def generator():
    for blog in blogs:
        yield '/' + blog + '/feed.atom'

# Warning during freezing:
# MissingURLGeneratorWarning: Nothing frozen for endpoints feed. Did you forget an URL generator?

In this example, "/some/blog/feed.atom" was frozen.

Explanation: I yield a URL but Frozen-Flask doesn’t check which endpoint that URL maps to.

Workaround: yield 'feed', {'path': blog}

In that case, it goes through url_for and knows the endpoint.

This comment has been minimized.

Show comment Hide comment

lu-zero Dec 3, 2014


lu-zero commented Dec 3, 2014


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