Flask static file importing issues

I’m trying to write my first webapp with Flask. I learned that to use css in my site, I have to use a static folder, because my css is never gonna change while the site is running (when it is online). …

TypeError: __init__() got an unexpected keyword argument ‘number’

I am using Flask to create a /register before call the /login page. This error show when I submit my register and go to ‘/login’. This is my ‘app.py’: from projeto import app, db from flask import …

How to create multiple routes dynamically for same function and pass data which is fetched on the basis of Unique ID to single template in FLASK

I am a newbie to FLASK. I am creating an e-commerce site in flask and I want to create multiple routes dynamically for same function and pass data which is fetched on the basis of Unique ID to single …

How to open and process .rtf files in Flask

I am trying to send a request including a rtf file and process it in Flask. In my python script, I used the striprtf lib to read this file and then process it. rtf = Path(file_path).read_text() text = …

flask python website save user input and add it to the list

this website currently starts out with two input fields at the tope left corner. The first input is the persons name and the second input is the question they have.Currently it just prints successful …

How to get full filepath on Flask?

I want to get a full file path on Flask. This is part of HTML code.

<…

PyCharm is giving an unused import error for routes, and models

I am trying to build a basic Flask project. Here is the app.py file. from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager app = Flask(…

How to link static folder in Google app engine with a storage bucket

Created a new python Flask app-engine python project and want to use the static files from Google cloud storage. I am using this yaml.file: runtime: python env: flex entrypoint: gunicorn -b :$PORT …

pass variable from JavaScript to Python using Flask [closed]

It’s an error I’ve been stuck on for a while. var longitude = 20 How would I pass this to python with Flask without using any complicated GET/POST requests? My end goal is to print the statement in …

Contained submit button validating other forms

I have two forms on my page, each with its own fields and submit button, but whenever I use any of them, they always check the overall page fields instead of just the form they’re contained in… The …