Sadece Flask'ı öğrenmeye başladım ve bir POST yöntemine izin verecek bir form oluşturmaya çalışıyorum.Flask - POST Hatası 405 Yöntem Kullanılmıyor
@app.route('/template', methods=['GET', 'POST'])
def template():
if request.method == 'POST':
return "Hello"
return render_template('index.html')
Ve index.html:
<html>
<head>
<title> Title </title>
</head>
<body>
Enter Python to execute:
<form action="/" method="post">
<input type="text" name="expression" />
<input type="submit" value="Execute" />
</form>
</body>
</html>
çalışıyor (Bu GET aldığında bunu render) formu yükleniyor İşte benim yöntemidir. Ancak gönder düğmesine tıkladığımda, POST 405 hatası Metod İzin Verilmiyor. Neden gösterilmiyor?