[Solved] Connect a Flask webservice from a device which is not on the same network

Let A be the server you connecting to. Let B be the server you are connecting from, which, from what I gather, is sometimes localhost. Why can’t B connect to A? 1. Security Settings The following is EC2-specific: You have to open up connections to specific IPs. Check your instance’s security settings. If you added … Read more

[Solved] mysql_exceptions.OperationalError | _mysql_exceptions.OperationalError: (1045, “Access denied for user ‘root’@’localhost’ (using password: YES)”) [closed]

Your password is not correct, try connect with: mysql -u root -p<YOUR_PASSWORD_HERE> Or, use mysqlsafe and change your root password. 1 solved mysql_exceptions.OperationalError | _mysql_exceptions.OperationalError: (1045, “Access denied for user ‘root’@’localhost’ (using password: YES)”) [closed]

[Solved] Is it possible to have flask api running on apache with already running PHP site for same domain? [closed]

That is possible. You will need to specify a certain route for each app. For example, foo.com/ -> PHP foo.com/api -> Flask App A sample apache config would be something like this: <VirtualHost *:80> ServerName foo.com ProxyPreserveHost On ProxyPass / http://127.0.0.1:8080/ ProxyPassReverse / http://127.0.0.1:8080/ ProxyPass /api/ http://127.0.0.1:8081/ ProxyPassReverse /api/ http://127.0.0.1:8081/ </VirtualHost> 2 solved Is it … Read more

[Solved] Flask App will not load app.py (The file/path provided (app) does not appear to exist)

You haven’t got anything in your template called blogposts. You need to use keyword arguments to pass the data: return render_template(‘index.html’, blogposts=blogposts) Also note you should really do that query inside the function, otherwise it will only ever execute on process start and you’ll always have the same three posts. 4 solved Flask App will … Read more

[Solved] TutorialsPoint – Flask – SQLAlchemy not working

The tutorial has an indentation problem in the student class. The constructor code should be indented one level so it becomes a method of the student class. Corrected code: (note the indent of “def init(self, name, city, addr,pin):” in the code below) class students(db.Model): id = db.Column(‘student_id’, db.Integer, primary_key = True) name = db.Column(db.String(100)) city … Read more

[Solved] Re-Ask: Whats wrong with the Flask-Bootstrap?

There is an issue with the way you are initializing flask-bootstrap. This how you should go about it: # Your previous imports from flask_bootstrap import Bootstrap app = Flask(__name__) bootstrap = Bootstrap(app) # … Basically, update the line: Bootstrap(app) to: bootstrap = Bootstrap(app) This is exactly what you have done for the other installed packages … Read more

[Solved] Background Processing in Swift

Despite getting downvoted, I still think my solution may be useful to someone new to notifications in iOS development. I switched from local notifications to push notifications setting my remote flask application to handle all the background processing and notification sending with firebase: Follow this tutorial to set your app for receiving push notifications: https://www.youtube.com/watch?v=34kvGKdPN2k … Read more

[Solved] builtins.TypeError TypeError

You don’t need to pass category_name, you only need the category id. The category name should be contained in each of the item fetched from the database. You’re getting an error because cat_id is not defined when the function def getCategoryItems(category_name, cat_id) is called. I would suggest, however, if you want to really get all … Read more