All Questions
1,087
questions
0
votes
0
answers
36
views
How do I upload an Excel sheet and show its data on the page?
models.py (database schemas):
from app import db, login_manager
from flask_login import UserMixin
@login_manager.user_loader
def load_user(user_id):
return User.query.get(int(user_id))
class ...
0
votes
1
answer
62
views
Why aren't my tables listed by .table command?
I'm trying to make an SQLite database connection through Flask-sqlalchemy. I opened a command prompt where dbconnect.py is saved containing from dbconnect import app, db,Connect and db.create_all(). ...
0
votes
0
answers
22
views
flask pyinstaller executable unable to create/read SQLite3 database
I've created a flask executable using pyinstaller. The app has to read and write to a SQLite3 database. I am using flask-sqlalchemy and flask-migrate, flaskwebgui for opening in browser. The ...
-1
votes
1
answer
48
views
After modifying the schema Flask with wsgi tells me there is no such column, but it's there
I followed the Flask tutorial (https://flask.palletsprojects.com/en/3.0.x/tutorial/) and created a Flask app with factory and a SQLite database. I run the app on a server via uwsgi and added github ...
0
votes
0
answers
25
views
error importing mapped_column pythonanywhere
I am trying to deploy a flask webapp into pythonanywhere, have configured the WGSI, uploaded the files but when I try to access the webapp comes the message "an error has occured". The error....
0
votes
0
answers
11
views
Celery-Flask Don't add records with async feature
Celery tasks don't save records to database in Flask. I don't know if i messed up configuration or have some different problem. I cant add async users to database. I don't have any errors. it jus ...
0
votes
2
answers
81
views
Flask-SQLAlchemy: How to properly call the "app" to initialize SQLAlchemy database object?
Good day everyone. I am new to Flask framework and currently trying to redo my Flask app to a proper project structure that I saw (online) since I want to integrate a Dash app later on. I am sorry if ...
1
vote
0
answers
70
views
Flask App running within Docker for File Upload
I wrote the following flask application which will collect a file selected and then upload it to a database running in sql lite. If i run the app locally, it works fine with the table created in the ...
0
votes
0
answers
20
views
Flask - SQL alchemy not creating tables and inserting data
I'm trying to create my first web app with flask and sqlite. I've followed the quickstart - guide from Flask-SQLalchemy and try to make my first table. Here is the code:
from flask import Flask
from ...
0
votes
0
answers
47
views
Deleting data from the sqlite3 database Python-Flask
I want the data to be deleted from my database and table when the delete button next to the Doctor in the table is clicked (code provided below). please help me do that, that would mean a lot.
d_admin....
1
vote
1
answer
56
views
import sqlite3 python Flask
I want to perform the operation in the code that I wrote below in the app.py file in Python Flask, in the file named Doktor.py in the file named Package.
@app.route("/gdoktor", methods=['GET'...
0
votes
1
answer
29
views
import sqlite3 creating table python [closed]
I cannot create a table in SQLite in Python with the following code. Can you help me where is the error in the code?
conn = sqlite3.connect('hospital.db')
c = conn.cursor()
c.execute(""&...
0
votes
1
answer
33
views
SQLite database locking even with threading.Lock
I use sqlite3 database on my flask website, and on each database access I use a threading.Lock in order to avoid memory races:
# one sync, one connection, one cursor for the entirety of the website
...
0
votes
3
answers
205
views
"Error: No such command 'db'" from "flask db init"
I am creating a Flask application on MacOS Sonoma 14.4.1 and Visual Studio Code using SQLAlchemy with sqlite3. When trying to initialize and create the tables using flask db init I get:
Usage: flask [...
0
votes
0
answers
37
views
SQLITE3: printing result gives none but doing same for result[0] gives the result
Hello i am trying to create a flask app. i am facing problem where datatype of result is none but result[0] is a string.
Code:
def fetch_file(self,token):
with self.connect() as db:
try:
...