Python3 flask Easy to get started __python

Source: Internet
Author: User

Flask is the most lightweight frame in Python, which shows the page that visited the homepage, landed successfully, and failed landing.

When writing URL-handling functions, it is also important to get user data from HTTP requests in addition to configuring URLs. The web framework provides its own APIs to implement these features. Flask Gets the content code for the form by request.form[' name ' :

#-*-coding:utf-8-*-# @Time: 2017/10/14 16:54 # @Author: Snake cub # @Email: 643435675@qq.c Om # @File: flasktest.py from flask import Flask flask Import Request app = Flask (__name__) @app. Route ('/', meth ods=[' get ', ' POSt '] def home (): Return ' 
Open in direct run browser: 127.0.0.1:500 1 home Page

2 Enter Password correct success page:

3 Enter Password failure page:

Ending ...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.