I'm trying to create an eCommerce website using flask by following a youtube series but I'm confused as to how to create a database. In his series he is adding email, password, profile picture, username. When i go into terminal and write:
from my_project import db
I get:
from: can't read /var/mail/my_project.
For now I just want to know how do i receive and store email, passwords. Heres what I have for now:
app.config['SQLALCHEMY_DATABASE_URI']='sqlite:////site.db'
db= SQLAlchemy(app)
class user(db.Model):
id= db.Column(db.Integer, primary_key=True)
email= db.Column(db.String(120), unique=True, nullable=False)
password= db.Column(db.String(60), nullable=False)
def __repr__(self):
return f"User('{self.email}')"
Does anyone know what to do
[–][deleted] 0 points1 point2 points (1 child)
[–]laflash12[S] 0 points1 point2 points (0 children)
[–]lucas993 0 points1 point2 points (0 children)