我想通過(guò) Flask 應(yīng)用程序在我的 html 文檔中接收 Youtube 嵌入視頻,所以我在數(shù)據(jù)庫(kù)中有嵌入視頻的鏈接,并且我能夠獲取鏈接,但它只是文本格式請(qǐng)幫助我選擇正確的數(shù)據(jù)類(lèi)型數(shù)據(jù)庫(kù)Python代碼: class Youtube(db.Model): sno = db.Column(db.Integer, primary_key=True) embeded_video = db.Column(db.String(100), nullable=False)@app.route("/videos/fixing")def fixingpage(): posts = Youtube.query.filter_by().all() return render_template('post.html', posts=posts)Html 代碼 (post.html) : - <div>{{ posts.embeded_video }} </div>輸出 :-It is printing as it is embeding link<iframe src="https://www.youtube.com/embed/OWN03n12VAc" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> Insted of it I want video to be Inserted
如何在flask sqlalchemy中接收來(lái)自數(shù)據(jù)庫(kù)的鏈接
拉風(fēng)的咖菲貓
2023-10-11 22:48:10