title: Flask function from class inheritance does not return correctly
body: <pre><code>from app import app
  import json
  from flask.views import MethodView
  
  from flask import request
  from flask import url_for
  
  from modules.auth import authenticate
  
  @app.route('/')
  def index():
          return app.send_static_file('index.html')
  
  
  class Authentication(object):
      def __init__(self, request):
          form_data = request.form
          if form_data.get('producer_apikey', None):
              self.producer_data = authenticate(
                  form_data['producer_username'], form_data['producer_apikey'], form_data['region'])
          if form_data.get('consumer_apikey', None):
              self.consumer_data = authenticate(
                  form_data['consumer_username'], form_data['consumer_apikey'], form_data['region'])
  
      def do_check(self):
           if self.producer_data.get("msg", None):
               return json.dumps
                   { "message" : self.producer_data["msg"] })
           if self.consumer_data.get("msg", None):
               return json.dumps(
                   { "message" : self.consumer_data["msg"] })
  
  
  
  class ImageShareForm(MethodView, Authentication):
      def __init__(self):
          Authentication.__init__(self, request)
  
      def get(self):
          pass
  
      def post(self):
          self.do_check()
  
  
  
  
  app.add_url_rule('/imageshareform', view_func=ImageShareForm.as_view('imageshareform'))
  </code></pre>
  
  <p>In the above code, when I run <code>self.do_check()</code> the condition does not return back to the browser. I would like to keep this function in class <code>Authentication()</code> because I will be reusing it a lot with class inheritance in other classes I will be writing. </p>