ДТ
Size: a a a
ДТ
MB
Environment="PATH=/home/project/va/venv/bin"
ExecStart=/home/project/va/venv/bin/gunicorn --workers 3 --bind unix:app.sock -m 007 wsgi:app
KM
ДА
ДА
ДА
ДТ
ДА
ДА
ДТ
ДТ
MB
Environment="PATH=/home/project/va/venv/bin"
ExecStart=/home/project/va/venv/bin/gunicorn --workers 3 --bind unix:app.sock -m 007 wsgi:app
MB
ДА
сompatibilites = db.Table('сompatibilites',
db.Column('left_id', db.Integer, db.ForeignKey('products.id')),
db.Column('right_id', db.Integer, db.ForeignKey('products.id'))
)
class Products(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(255))
type = db.Column(db.String(63))
text = db.Column(db.String(1024))
specs = db.relationship('Specs', backref='product', lazy='dynamic')
slides = db.relationship('ProductSlides', backref='product', lazy='dynamic')
img = db.Column(db.String(6), unique=True)
price = db.Column(db.Integer)
compatibilities = db.relationship('Products', secondary=сompatibilites, backref=db.backref('competibilities', lazy='dynamic'))
ДА
sqlalchemy.exc.InvalidRequestError: One or more mappers failed to initialize - can't proceed with initialization of other mappers. Triggering mapper: 'mapped class Products->products'. Original exception was: Could not determine join condition between parent/child tables on relationship Products.compatibilities - there are multiple foreign key paths linking the tables via secondary table 'сompatibilites'. Specify the 'foreign_keys' argument, providing a list of those columns which should be counted as containing a foreign key reference from the secondary table to each of the parent and child tables.
ДА
A
A
A
ДА