0
作業中の理由から、名前またはコメントコードを変更せずに、プロジェクトの同じページを無効にする必要があります。私は、ユーザーpage_disabled.htmlに見せる必要がページ上でこれを置く@disable_page
、のようなソリューションを必要とpythonフラスコ無効マニュピュレーションページ
@app.route('/about')
def about():
return render_template('about.html')
:これは私のコード例です。これどうやってするの? @disable_page
デコレータは@app.route
下に行かなければならない
def disabled():
return render_template('page_disabled.html')
def disable_page(func):
return disabled
@app.route('/about')
@disable_page
def about():
return render_template('about.html')
:
は機能上のみ可能ですか? defを無効にしました(func): return render_template( 'about.html') – selfmarket