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


    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


    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


    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


    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


    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


    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


    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 \ –name open_source_mysqldb \ -e […]

  • Flask plug in series – flask mongoengine


    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 […]

  • My first gitbook: Flask Web Development Notes


    Book address head-first-flask Flask introduction There are many web development frameworks in Python, such as Django, flask, tornado, little and web.py. Django can be said to be an all in one framework, with its own management background; and flask is a very lightweight framework, which provides the necessary components for building web services. If you […]

  • The method of passing or receiving JSON file in flask


    Recently, in learning Python’s flash micro framework, the most commonly used is to interact with the front-end for rest API, so it’s a common practice to naturally transfer JSON, and specifically summarizes several methods of interacting with the front-end. 1. Using flask‘srequest.form.get()Method This method mainly uses flask’srequest.form.getMethod to get the JSON file sent by the […]

  • Small projects organized by gulp


    At present, we are developing a python markdown wiki system. There are some options for front-end modularization and packaging.1. Modularization and packaging with web packBecause the project is relatively small, after a little understanding, I don’t think it is necessary to use webback. Why do you use ox knife to kill chickens?2. Adopt requirejs modularization […]