# -*- coding: utf-8 -*-
import os
from flask import Flask, Response, url_for

instancepath = os.path.join(os.environ['OPENSHIFT_PYTHON_DIR'], 'instance')
app = Flask(__name__, instance_path=instancepath)
app.config['PROPAGATE_EXCEPTIONS'] = True

db_url = os.environ.get('OPENSHIFT_MYSQL_DB_URL', None)
if db_url:
    db_url = db_url.replace("mysql", "mysql+mysqldb")
    app.config['SQLALCHEMY_DATABASE_URI'] = db_url
    print(db_url)
else:
    print("OPENSHIFT_MYSQL_DB_URL not found.")

db = SQLAlchemy(app)


# The '/' page is accessible to anyone
@app.route('/')
def home():
    return "Hello world!"

@@ -70,16 +70,56 @@
 url_for%0A
+from haodooscraper.model import Volume%0A%0A
 %0Ainstanc
@@ -284,364 +284,156 @@
 ue%0A%0A
-db_url = os.environ.get('OPENSHIFT_MYSQL_DB_URL', None)%0Aif db_url:%0A    db_url = db_url.replace(%22mysql%22, %22mysql+mysqldb%22)%0A    app.config%5B'SQLALCHEMY_DATABASE_URI'%5D = db_url%0A    print(db_url)%0Aelse:%0A    print(%22OPENSHIFT_MYSQL_DB_URL not found.%22)%0A%0Adb = SQLAlchemy(app)%0A%0A%0A# The '/' page is accessible to anyone%0A@app.route('/')%0Adef home():%0A    return %22Hello world!%22
+%0A# The '/' page is accessible to anyone%0A@app.route('/')%0Adef home():%0A    volumes = Volume.query_all()%0A    return %22Hello world! %7B0%7D%22.format(len(volumes))
 %0A

Use model directly.