Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はflask-pythonでウェブサイトを開発しています。変数にhtmlファイルを作成します。render_template('index.html')を記述する代わりにこの変数をレンダリングできますか?これが私のコードです:
replacedView = rc.replaceActions()
これでreplacedViewにhtmlファイルのコードがあります。私の目的はjinja2にこれをレンダリングすることです。それは可能ですか?
質問を解決しました。答えはとても簡単でした。最後に、内部にhtmlを含む変数があるので、それを返しました。
return replacedView