I am trying to make a php login into tornado and when I click "Sign in" I am getting a page with an error saying "405 Method not allowed".
Here is my form:
<form method="POST">
<fieldset id="inputs">
<input name="username" id="username" required>
<input name="password" id="password" type="password" name="Password" placeholder="Password" required>
</fieldset>
<fieldset id="actions">
<input type="submit" id="submit" value="Log in" name="submit">
<label><input type="checkbox" checked="checked"> Keep me signed in</label>
</fieldset>
</form>
You need to add an action to your form and have a post method in your handler. If you set up a handler like:
(r"/feedback", FeedbackHandler)
Which has a post method:
def post(self):
#do something here
And a form which has:
<form action="/feedback" method="post" >
It should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With