1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] I'm getting an error "Working outside the context of the application application"...

Discussão em 'Python' iniciado por Stack, Setembro 13, 2024.

  1. Stack

    Stack Membro Participativo

    `from loja import db class User(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(40), unique=False, nullable=False) username = db.Column(db.String(80), unique=True, nullable=False) email = db.Column(db.String(120), unique=True, nullable=False) password = db.Column(db.String(180), unique=False, nullable=False) profile = db.Column(db.String(180), unique=False, nullable=False, default='profile.jpg') def __repr__(self): return '<User %r>' % self.username db.create_all()`

    error in "db.create_all()"

    I'm starting to create this site but I've been getting this error, working outside the context of the app, if you could tell me which folder I should fix too, I'd be grateful enter image description here


    Continue reading...

Compartilhe esta Página