Home > other > Flask in the address bar, please how to hide out url_for parameters passed
Flask in the address bar, please how to hide out url_for parameters passed
Time:11-21
To teacher_info view function in the login view function with url_for pass the username parameter:
@ app. The route ('/login/', the methods=[' GET 'and' POST ']) Def the login () : Return redirect (url_for (' teacher_info 'username=' * * ')) # use url_for (' teacher_info 'username=' Joe ', _method='POST') are not
@ app. The route ('/teacher_info/', the methods=[' GET 'and' POST ']) Def teacher_info () : . Return render_template (' teacher_info. HTML)