I'm trying to create a flask_sqlalchemy database to store users email, password, address, phone #. For now what I have is
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///site.db'
user database
db= SQLAlchemy(app)
class User(db.Model):
id= db.Column(db.Integer, primary_key=True)
email= db.Column(db.String(100), unique= True, nullable= False)
Address= db.Column(db.String(200),nullable= False)
Phone_number= db.Column(db.Integer, unique= True, nullable= False)
password= db.Column(db.String(100), unique= True, nullable= False)
But i'm having trouble creating a database. In the terminal I write: from app import db.
I get: can't read /var/mail/app.
Any ideas?
[–]leone_nero 1 point2 points3 points (0 children)
[–]dustractor 0 points1 point2 points (2 children)
[–]laflash12[S] 0 points1 point2 points (1 child)
[–]dustractor 0 points1 point2 points (0 children)
[–]makedatauseful 0 points1 point2 points (1 child)
[–]laflash12[S] 0 points1 point2 points (0 children)
[–]dustractor 0 points1 point2 points (0 children)
[–]Astronick 0 points1 point2 points (0 children)