Tag:flask

  • Specific use of flash response response

    Time:2021-11-28

    catalogue introduction Response response Tuple form response make_ Response function Return JSON format data Other special responses Redirect Abort() interrupt source code introduction The client sends an HTTP request to the flash program. After flash calls the view function, it will take its return value as the content of the response. In most cases, the […]

  • Flask uses Sqlalchemy to implement persistent data

    Time:2021-11-25

    catalogue The project introduces flask Sqlalchemy ORM introduction and model definition Table relation type and coding implementation One to many relationship (many to one relationship) One to one relationship Many to many relationship Basic database operation insert to update query delete The project introduces flask Sqlalchemy First, install the flash Sqlalchemy extension: $pip install flask-sqlalchemy […]

  • Sample code for creating a search engine with scratch + Flash + HTML

    Time:2021-10-7

    catalogue 1. Preparatory knowledge 2. Grab CSDN data interface 2.1 view CSDN search engine Homepage 2.2 test the function of CSDN search engine 2.3 view more information about related articles 2.4 fetching Ajax asynchronous request data 2.5 analysis URL address 3. Use scratch to crawl CSDN data interface 3.1 start_requests 3.2 extract data using Parse […]

  • Python implementation of flash in the return of image stream to the front-end display

    Time:2021-4-26

    Scenario requirements:You need to find a picture in the local flash server and return it to the front end for display. Questions:Usually, the front-end < img > tag will only accept the form of URL to display the image, and never try to return a local image of the server to the front-end. So write […]

  • Python solves the problem of online browsing or direct downloading of flash pictures

    Time:2021-4-24

    At present, the image is stored in mongodb database to implement a method, such as accessing / get_ PIC / ID can open pictures in the browser and add a state, such as? File name = 1. PNG to download pictures directly, You need to add headers to the response in the read image function […]

  • Flash upload image and zoom as an example of avatar

    Time:2021-4-21

    Personal development of the flash forum into the end, there is still the last upload pictures to replace the avatar function, worked all day, and finally solved all the problems, now record the solution. 1. Upload files To analyze what we need to do to change the avatar function, the simple idea is: upload the […]

  • Flash upload custom avatar example explanation

    Time:2021-4-20

    Flash web development is basically finished, but I still need to review it later. But I always feel that my blog is a little crude, so I’m using my brain to develop new functions Today, I think of the most basic function, custom avatar This kind of function is designed into two basic function blocks […]

  • Ajax post download flash file stream and Chinese file name problems

    Time:2020-10-1

    Ajax post download file The back end returns the file stream, which can be used in flagreturn send_file(file path) returns the binary file stream and transmits the file related information (such as the file name) in the headers. Front end useURL.createObjectURL() Create create aDOMString URLObject, create a a node, assign the URL object to the […]

  • The method of using flag WTF to verify uploaded files

    Time:2020-9-11

    Using flag WTF to verify the uploaded files When defining the validation form class, filefield should be used for fields of file type, that is wtforms.FileField 。 The verifier needs to start from flash_ wtf.file Import. flask_ wtf.file.FileRequired And flask_ wtf.file.FileAllowed flask_ wtf.file.FileRequired Is used to verify that the file upload cannot be empty. flask_ […]

  • “Insight” Deployment Guide of Yixin open source vulnerability management platform

    Time:2020-5-9

    Insight is a management platform integrating application system asset management, vulnerability life cycle management and security knowledge base management. “Insight” is developed in Python language and implemented in the deployment of flask framework + MySQL + docker. 1、 Deploy and start MySQL docker pull mysql:5.7.13 docker run -d -p 127.0.0.1:6606:3306 \ –name open_source_mysqldb \ -e […]

  • Flask plug in series – flask mongoengine

    Time:2020-2-10

    brief introduction Mongodb is a document database, which is a kind of NoSQL (not only SQL). It has many advantages, such as flexibility, easy expansion and so on. It is favored by many developers. Mongoengine is an ORM framework used to operate mongodb. If you don’t know what ORM is, please refer to the section […]