|
@ -16,8 +16,8 @@ import cStringIO |
|
|
from pkg_resources import resource_filename |
|
|
from pkg_resources import resource_filename |
|
|
|
|
|
|
|
|
import flask |
|
|
import flask |
|
|
import flask.ext.restless |
|
|
|
|
|
import flask.ext.sqlalchemy |
|
|
|
|
|
|
|
|
from flask_restless import APIManager |
|
|
|
|
|
from flask_sqlalchemy import SQLAlchemy |
|
|
from flask_bootstrap import Bootstrap |
|
|
from flask_bootstrap import Bootstrap |
|
|
from kombu import Connection |
|
|
from kombu import Connection |
|
|
from kombu.pools import producers |
|
|
from kombu.pools import producers |
|
@ -60,7 +60,7 @@ template_path = resource_filename(__name__, "templates") |
|
|
app = flask.Flask('faafo.api', template_folder=template_path) |
|
|
app = flask.Flask('faafo.api', template_folder=template_path) |
|
|
app.config['DEBUG'] = CONF.debug |
|
|
app.config['DEBUG'] = CONF.debug |
|
|
app.config['SQLALCHEMY_DATABASE_URI'] = CONF.database_url |
|
|
app.config['SQLALCHEMY_DATABASE_URI'] = CONF.database_url |
|
|
db = flask.ext.sqlalchemy.SQLAlchemy(app) |
|
|
|
|
|
|
|
|
db = SQLAlchemy(app) |
|
|
Bootstrap(app) |
|
|
Bootstrap(app) |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -96,7 +96,7 @@ class Fractal(db.Model): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
db.create_all() |
|
|
db.create_all() |
|
|
manager = flask.ext.restless.APIManager(app, flask_sqlalchemy_db=db) |
|
|
|
|
|
|
|
|
manager = APIManager(app, flask_sqlalchemy_db=db) |
|
|
connection = Connection(CONF.transport_url) |
|
|
connection = Connection(CONF.transport_url) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|