title: Define manually routes using Flask
body: <p>I want to define routes manually to some method of classes, something like this :</p>
  
  <pre><code>class X:
  
      def route1():
         #do stuff here
  
      def route2():
         #do stuff here
  </code></pre>
  
  <p>and then make something like this :</p>
  
  <pre><code>app.add_url_rule('/x/', view_func=X.route1())
  app.add_url_rule('/y/', view_func=X.route2())
  </code></pre>
  
  <p>It's possible?? What's the correct way to acomplish this?</p>