apiguy / flask-classy

Class based views for Flask
http://packages.python.org/Flask-Classy/
Other
541 stars 68 forks source link

urls resolving to the wrong methods #18

Open bdeggleston opened 11 years ago

bdeggleston commented 11 years ago

if I define two classes and methods with the same class names and method names, but are in different files with different urls in the route decorator, requests for one method will be erroneously routed to the wrong class

#app.module1
class SomeView(FlaskView):

    @route('/some/view')
    def do_something_cool(self):
        return response.success('123')
#app.module2
class SomeView(FlaskView):

    @route('/some/other/view')
    def do_something_cool(self):
        return response.success('456')

If I hit the url /some/view, it will call the route /some/other/route

apiguy commented 11 years ago

Interesting. I presume that the endpoints used by url_for will be similarly corrupted. I'll write a test case up and see if I can't get a fix out for this.

Sohair63 commented 10 years ago

Is this issue is resolved?