Browse Source

updated deps for flask-restless-ng and SQLAlchemy

pull/3/head
Sebastian Rieger 7 months ago
parent
commit
0101ae4b97
  1. 8
      faafo/faafo/api/service.py
  2. 35
      faafo/requirements.txt

8
faafo/faafo/api/service.py

@ -101,7 +101,7 @@ class Fractal(db.Model):
with app.app_context():
db.create_all()
manager = APIManager(app, flask_sqlalchemy_db=db)
manager = APIManager(app=app, session=db.session)
connection = Connection(CONF.transport_url)
@ -110,8 +110,8 @@ connection = Connection(CONF.transport_url)
@app.route('/index/<int:page>', methods=['GET'])
def index(page=1):
fractals = Fractal.query.filter(
(Fractal.checksum != None) & (Fractal.size != None)).paginate( # noqa
page, 5, error_out=False)
(Fractal.checksum != None) & (Fractal.size != None)).paginate(
page=page, per_page=5)
return flask.render_template('index.html', fractals=fractals)
@ -147,6 +147,6 @@ def main():
with app.app_context():
manager.create_api(Fractal, methods=['GET', 'POST', 'DELETE', 'PUT'],
postprocessors={'POST': [generate_fractal]},
exclude_columns=['image'],
exclude=['image'],
url_prefix='/v1')
app.run(host=CONF.listen_address, port=CONF.bind_port)

35
faafo/requirements.txt

@ -1,20 +1,31 @@
pbr>=1.6
#pbr>=1.6
pbr
pytz
positional
iso8601
anyjson>=0.3.3
eventlet>=0.17.4
#anyjson>=0.3.3
anyjson
#eventlet>=0.17.4
eventlet
#PyMySQL>=0.6.2,<0.7 # 0.7 design change breaks faafo, MIT License
PyMySQL>=0.6.2
#PyMySQL>=0.6.2
PyMySQL
#SQLAlchemy>1.3,<1.4 # 1.4 breaks faafo list
SQLAlchemy>=2.0.16
Pillow==2.4.0 # MIT
requests>=2.5.2
#SQLAlchemy>=2.0.16
SQLAlchemy
#Pillow==2.4.0 # MIT
Pillow
#requests>=2.5.2
requests
Flask-Bootstrap
Flask
flask-restless
flask-restless-ng
flask-sqlalchemy
oslo.config>=2.3.0 # Apache-2.0
oslo.log>=1.8.0 # Apache-2.0
PrettyTable>=0.7,<0.8
kombu>=3.0.7
#oslo.config>=2.3.0 # Apache-2.0
#oslo.log>=1.8.0 # Apache-2.0
#PrettyTable>=0.7,<0.8
#kombu>=3.0.7
oslo.config
oslo.log
PrettyTable
kombu
Loading…
Cancel
Save