Questions tagged [flask-mysql]

103 questions
-1
votes
2 answers

How to take table name from user input in flask?

@app.route("/CreateAScheme",methods=['GET','POST']) def CreateAScheme(): if request.method == 'POST': userDetails = request.form Scheme = userDetails['Scheme'] con = MySQL.connection.cursor() …
-1
votes
1 answer

Flask run isn't running and gives me error

im trying to run flask and when i run flask run I get this error (snoop) ether@ether:~/Documents/loginsystem$ flask run * Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a…
redbulll
  • 91
  • 4
  • 10
-1
votes
2 answers

Pass form data from one html page to another html page and datase in flask

I am willing to fill a form(HTML) and pass that data into another HTML page and also insert that data into a database. app.py @app.route('/signup') def signup(): return render_template("client_signup.html") @app.route('/registered') def…
Jay Desai
  • 231
  • 1
  • 2
  • 12
-1
votes
1 answer

Edit and Update method is working.But,how to retrieve the values from database while editing the existing values

I'm Creating Small Size of Web Interface.I created the edit button in Web Interface.But ,it's not working.It Creating as a new Entry in Database.Can anyone help me.One more thing is How to retrieve the values from database while editing existing…
Falcon bliss
  • 71
  • 2
  • 11
-1
votes
1 answer

Im having trouble while trying to install 'flask-mysqldb' resulting in an error code 1

The Command prompt Whenever I type pip install flask-mysqldb it results in an error code 1, I was wondering if anyone else has had this problem and can help. I am using windows 7 64bit
EdClark
  • 1
  • 1
-1
votes
2 answers

Flask MySQL online Database

I want to Deploy my Flask app but the problem I am facing is with databases. I am using MySQL database. I want to use an online MySQL database for which I am using website www.freemysqlhosting.net I Have created the tables, But Now I am not getting…
-2
votes
1 answer

NameError: name db is not defined after restructuring using blueprints

I have tried to re-structure my app using blueprints, and once completed, I get error:"NameError: name 'db' is not defined" I cannot see why the error comes up This is my init.py File: where app and db is initialised import os from flask import…
maxjames
  • 3
  • 1
-2
votes
1 answer

I have a problem with sql query don´t work in flask

i try to run that code but i have problems with the sql query, but if run the query in mysql workbeck it works app.config['MYSQL_HOST'] = "localhost" app.config['MYSQL_USER'] = "root" app.config['MYSQL_PASSWORD'] = "" app.config['MYSQL_DB'] =…
Edsen
  • 77
  • 3
  • 7
-2
votes
1 answer

Takes last 20 record and show last register

So i have a problem and i dont know how to look for him. @app.route('/',methods=['GET', 'POST']) def index(): if current_user.is_authenticated: current_user.update_on = datetime.utcnow() db.session.add(current_user) …
Tshibe
  • 59
  • 7
-2
votes
1 answer

Flask mysql getting response to SQL commands (not using SQL-Alchemy)

First, I understand the value of using ORM solutions, and will use SQL-Alchemy later. I have installed Flask and am using flask-mysql. I do not know how to get the results for a SQL "desc " command. Here is the code I'm working with: from flask…
JakeJ
  • 2,361
  • 5
  • 23
  • 35
-2
votes
2 answers

How to wipe flask clean?

I've been working on a website for the past year and used python and flask to built it. Recently I encountered a lot of errors and problems and decided to start a new project (pyCharm). I figured I could copy pieces of code into the new project…
MarkusAfricanus
  • 113
  • 1
  • 16
-3
votes
2 answers

unable to install flask-mysqldb module

pip install flask-mysqldb C:\Users\prince>pip install flask-mysqldb Collecting flask-mysqldb Using cached https://files.pythonhosted.org/packages/62/e3/955c845efe1aacf30c8e2607470544ede36aa1044f6382c809f13e014104/Flask-MySQLdb-0.2.0.tar.gz …
Prince Patel
  • 1
  • 1
  • 2
-5
votes
2 answers

Installing flask mysqldb

When i run pip install flask-mysql db is get this error: _mysql.c(29) : fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory.
1 2 3 4 5 6
7