Flask-Web-App-Tutorial icon indicating copy to clipboard operation
Flask-Web-App-Tutorial copied to clipboard

Methods = ['GET','POST'] issue

Open THC915 opened this issue 3 years ago • 2 comments

Im having issues below. It's about when I type the ,methods=['GET", 'POST'] behind @auth.route (pic.1). The program cannot run and the website occur like this (pic.2). Have anyone met this issue before?

Capture

Capture1

THC915 avatar Jan 18 '22 12:01 THC915

First of all, where you have imported methods from the crypt, methods is a typo, it should be method without s, and it seems like you have not used it also, there is no need for that if you don't need hashing, it is used for hashing, what it seems to me, correct me if I am wrong, are you trying to use crypt methods in route()'s methods which are two different things, you can try removing it. You don't have to import methods from crypt, if you don't need it, And yes crypt can't be used in Windows, as it is because crypt is a Unix Specific Service. You can use other methods for hashing, like passlib etc. If you want to know more about the error you can go to this https://stackoverflow.com/questions/19877867/using-the-crypt-module-in-windows

ASHISHKUMAR2411 avatar Jan 19 '22 17:01 ASHISHKUMAR2411

Remove the crypt model from the import section which is causing this error

bibinthomas123 avatar Jul 02 '22 13:07 bibinthomas123