Fix issues like issue 111 #145

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

In Flask's add_url_rule method, after add rule to url_map, then check whether the rule is added before.

rules_before_added = self.url_map._rules[:-1]
ix = rules_before_added.index(rule)

If the rule added before, then override the view function of previously rule.

if endpoint_override:
    self.view_functions[endpoint_override] = view_func
Owner

mitsuhiko commented Nov 27, 2010

That looks like a workaround. I will try a cleaner solution.

This issue was closed.

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