Skip to main content

All Questions

Tagged with
-2 votes
0 answers
24 views

Flask server is not listening to 127.0.0.1:5000 but it was able to listen on machines ip address <ip_address:5000> [closed]

I have a RESTful service with Flask server running on a Windows machine. I was able to get the response from the IP address of machine with port number 5000 <ip_address:5000> but not from the ...
Sandeep Konda's user avatar
0 votes
0 answers
12 views

Flask MongoEngine ListField(StringField) error

` from .db import db class Movie(db.Document): name = db.StringField(required=True, unique=True) casts = db.ListField(db.StringField(), required=True) genres = db.ListField(db.StringField()...
im3shn's user avatar
  • 1
0 votes
1 answer
37 views

Is it a must that my user model inherits from dm.Model before i can use UserMixin to handle login in python-flask?

I understand that this is the traditional way that people create user model in python-flask: class User(db.Model, UserMixin): id = db.Column(db.Integer, primary_key=True) username = db.Column(...
adeshina Ibrahim's user avatar
0 votes
0 answers
17 views

flask db init command executing without end

I had ran the command initially at the start of my project. I accidentally ran it again at the end when I was trying to get the whole project to run. I tried to remove the migration directory and ...
Monish Ramesha's user avatar
0 votes
1 answer
75 views

ImportError: cannot import name '_endpoint_from_view_func' from 'flask.helpers'

My App was working fine on Win11, but when pulling down to my mac and attempting to run, i see the above error. my library versions are: Flask 3.0.3 Flask-Cors 4.0.0 ...
Optional_Karl's user avatar
0 votes
0 answers
26 views

How can I generate a Flask request context and provide it to an API in Python?

I'm currently developing a Python interface for Keystone to manage users credentials, tokens, and other related functionalities. This involves interacting with Keystone's APIs to perform operations ...
Sari Zidan's user avatar
1 vote
1 answer
118 views

Do I need "if __name__ == '__main__': app.run()" in my Flask app on WSGI server?

I'm deploying a Flask application to an WSGI server. In my development code, I have the typical if __name__ == '__main__': app.run() block to run the app locally. I'm unsure if this code snippet is ...
Tharindu Anupa Hemachandra's user avatar
0 votes
1 answer
37 views

504 Error When Sending Requests to Flask RESTful Resources on PythonAnywhere

Hey I have a flask app and I am trying to host it on pythonanywhere. The app is running and I can visit the homepage at https://<my-username>.pythonanywhere.com. But when a user tries to log in ...
sigma's user avatar
  • 247
0 votes
0 answers
35 views

How to pass class variables into a websocket resource method with Flask?

I'm trying to access a class variable within my websocket resource method, so that I can store the websocket instance into a class variable and later send a websocket message from another method. app =...
anonymous's user avatar
0 votes
0 answers
45 views

is it right way to generate agora rtm token in python flask?

`# Generate agora rtm-token I am implementing a one-to-one chat feature in my Flutter application using Agora's RTM (Real-Time Messaging) service. I have a Python Flask API that generates Agora RTM ...
bhavik p's user avatar
0 votes
0 answers
38 views

How To Call Zerodha API In Flask

I wanted to call Zerodha API for search of instruments and adding to wishlist but can anyone guide me for how should I make it call for search of instruments in Flask app because GUI is in HTML and ...
Mst_rajatmishra's user avatar
0 votes
0 answers
39 views

How to generate crud methods for flask_restful resource classes

I'm trying to create some routing for my server and have found that I am repeating myself a lot when defining the methods for the classes that bridge my React requests and Flask SQLAlchemy models. ...
Radagast's user avatar
0 votes
1 answer
80 views

How do I solve flask authentication?

I am trying to do authentication in my flask app. After loggin in the user is redirected to protected endpoint /forms. But everytime I am getting redirected I get message { "msg": "...
jon's user avatar
  • 53
0 votes
1 answer
27 views

How can I access the flask.g variable from within a logging filter in Flask? And if not possible, how can I store/access a request scoped value?

I am working in a Flask application which is wrapped by Gunicorn. My custom log configuration below seems to work as long as I remove the references to my custom filter. But as soon as I add the ...
cyberguy's user avatar
  • 243
0 votes
1 answer
107 views

Did not attempt to load JSON data because the request Content-Type was not 'application/json

I need to receive a GPT chat request from the client, access the DatabaseData and send the formatted response to the user I've tried everything I can and I don't know what to do now, please help me. ...
ypichev's user avatar

15 30 50 per page
1
2 3 4 5
76