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

  • Analysis of Werkzeug local and localproxy


    First, post the official document address: http://werkzeug.pocoo.org/docHow many local?threading.localIn the werkzeug.local module:LocalLocalStackLocaProxy why not threading.local? Threading.local, who has been exposed to Java before, can’t be more familiar with this. Thread local variables, that is, the private variables of each thread, have thread isolation. According to our normal understanding, each HTTP request should correspond to a […]

  • Technology selection for mdwiki development


    Mdwiki is a markdown wiki system, which can be used as a knowledge base management system for individuals or small teams. Project address: given in the last article of this series (it will take time to organize and test) Why do I develop mdwikis? At present, my knowledge base management system adopts DokuWiki, which is […]

  • Mdwiki development road 2 resources and track record


    1. Bootstrap snippet: If you don’t have art cells, the way to be lazy is to look for them, such as the login box interface.Sidebar selection: http://www.designerslib.com/b… Mentioned http://bootsnipp.com/fullscreen.Other resources:w3schools-howtoA more dazzling HTML template (although not adopted in the end)Bootstrap theme 2. CSS height of div: 100% invalid solution: Add the following to the CSS: […]

  • An example of full stack development and deployment based on Flash + react


    brief introduction Sometimes when I browse information on the web, I will browse the information or articles of technical communities such as GitHub trending, Hacker News and rare earth nuggets, but I think it is time-consuming and inflexible to read them one by one. Later, I found out that there is a product called Panda […]

  • The third way of mdwiki development


    I can’t write it down. Just post the address.Rookie’s first Python project, light spray.Later, it is planned to change the client side session to server side session, and use redis to manage the session. Add picture and article crawlers. Refactor the code. Project address: https://github.com/xbynet/mdwiki

  • Interesting phenomena about Python not and is none


    Recently, I encountered a problem when I checked the source code of the flash sessioninterface. For example, I want to integrate redis as the storage of flash session. Reference: http://flask.pocoo.org/snippe… The following code snippets are found to be particularly confusing here: def save_session(self, app, session, response): domain = self.get_cookie_domain(app) if not session: self.redis.delete(self.prefix + session.sid) […]

  • Interesting discussion on the transaction submission of flask Sqlalchemy


    Recently, I encountered such a problem when developing mdwiki. Post is unbond to sessionI was curious post=Post.query.filter_by(location=location).first() abspath=util.getAbsPostPath(post.location) tagsList=[] … print(post in session) #False post.tags=tagsList In this way, it also reports that the post is not in the session? The call dB. Session. Commit () is not shownAdd a line of tests:print(post in session) #FalseHowever, […]