Skip to content
Advertisement

Tag: flask

Flask-SQLAlchemy: ‘Table’ object has no attribute ‘query_by’

I’m developing an API with Flask and I cannot retrieve queries from a MySQL database I’ve connected with flask-sqlalchemy (not sqlalchemy alone). This is a pre-existing database downloaded from my client’s PHPMyAdmin, so I haven’t ran db.create_all(): I simply created the connection string in config.py, then instantiated db = SQLAchemy() and initialized it (db.init_app(app)) in my factory function (i’m using

upload multiple files with fetch

I am trying to receive more than one file per time using reactjs and flask api, but I get this error fontend code using reactjs backend code using flask flask receiving the files as [‘[object File],[object File]’] . I tried to find ways to read an object file but nothing worked can anyone help.. Answer I don’t use React but

Image uploading in Flask blog with CKeditor 5

I’m stuck with following problem while creating my Flask based blog. Firstly, I used CKeditor 4 but than upgraded to 5 version. I can’t understand how to handle image upload on server side now, with adapters etc. As for 4 version, I used flask-ckeditor extension and Flask documentation to handle image uploading. I didn’t find any examples for this combination.

Database connection broken even with with SQLAlchemy pre-ping

Since I moved my database from a mssql docker container to an azure database as a service my web application( flask) is being disconnected after several minutes. It is simply solved by a refresh of the page but still, there is an issue here. The error raised by SQLAlchemy is an Operational Error (https://docs.sqlalchemy.org/en/14/errors.html#error-e3q8) I tried to implement the pool_pre_ping=True

Advertisement