• Flask 4 template


    Four, template FMTV F: Form form M: Model model (database) T: Template template 5: View view (routing) 1. Render template A template is a file containing the response text, which contains the dynamic part represented by a placeholder variable, with its specific value Only in the context of the request. Replace the variable with a […]

  • Django learning notes II of Python third party Library


    In the previous section, the project framework has been built. Now, connect to the database and create a model 1. Database settingsPython installs SQLite database by default Open the file: Dayang / settings.py Engine – database engine ‘django.db.backends.sqlite3’, ‘django.db.backends.postgresql’, ‘django.db.backends.mysql’, ‘django.db.backends.oracle’. Name – name of the database Tip: if you choose SQLite, the database is […]

  • How to activate SQLiteManager


    How can SQLiteManager be activated?SQLiteManager is a powerful SQLite database management tool. The software supports multi-national languages, with functions of visual interface, table management, data browsing and editing, SQL statement query, database file error correction, optimization, etc. it can view SQLite database (encrypted database can also be viewed), which is a very reliable software. Small […]

  • SQL statement memo (Walker)


    Structured query language (SQL for short) is a special purpose programming language. It is a database query and programming language, used to access data and query, update and manage relational database system. Add an auto ID field ALTER TABLE tblname ADD COLUMN csmid COUNTER (0, 1) Access creates a table with auto increment fields CREATE […]

  • Flash 2 quick start


    I. a minimal flask application from flask import Flask app = Flask(__name__) #App is a program instance. A project can only have one program instance @app.route(‘/’) #Route decorator def hello_world(): #View function return ‘Hello World!’ #Returns a string if __name__ == ‘__main__’: app.run() Save the program as hello.py and run it with Python interpreter $ […]

  • Request and response of flask III


    II. Request and response 1. HTTP method Get: the browser tells the server to only get the information on the page and send it to me. This is the most commonly used method. Post: the browser tells the server that it wants to publish new information on the URL. Also, the server must ensure the […]

  • Coredata collation (2) – multithreading scheme


    Coredata collation (2) – multithreading scheme Catalog Why multithreading How to use multithreading Multithreading scheme Why multithreading When you get here, you must ask, the function of adding, deleting, modifying and querying has been realized. Why use multithreading well? In fact, core data is Data Persistence technology after all. If the amount of data is […]

  • Coredata arrangement (3) — the use of magic record


    Coredata arrangement (3) — the use of magic record Catalog How to use magicalrecord Crud operation by magicalrecord How to use magicalrecord Magicalrecord encapsulates coredata once, encapsulates complex operations in multi-threaded core data, and provides rich encapsulation methods, with clear and concise code. The magic record framework provides two common MOCS,rootSavingContextIt is used for docking […]

  • Coredata collation (4) — data migration and other issues


    Coredata collation (4) — data migration and other issues Catalog Lightweight data migration Subsequent problems Lightweight data migration In the process of iteration of APP version, it is inevitable to change the. Xcdatamodel file, such as adding or deleting an entity, adding or deleting the attributes of an original entity, etc. If you do not […]

  • Introduction to SQLite


    sqlite Official document: https://www.sqlitetutorial.ne…Rookie tutorial: https://www.runoob.com/sqlite… To import SQL files from the command line Connect (open database) For example, there is test.db in the current folder sqlite>.open test.db Check which databases are connected sqlite>.databases Import SQL file For example, there is test.sql in the current folder sqlite>.read test.sql View all table names sqlite>.tables Checklist structure […]

  • Python Ethereum blockchain interaction stores data into database


    Introductory workshops on blockchain usually start with stories like easy to understand point-to-point networks and bank ledgers, and then jump directly to writing smart contracts, which seems very abrupt. So imagine yourself walking into the jungle, and the Ethereum blockchain is a strange creature you are about to study. Today we will look at the […]

  • A brief introduction to SQLite and usage scenarios


    What is SQLite? SQLite is a lightweight embedded database. Its database is a file. Small embedded systems, similar to mysql, are smaller and have relatively few functions. They occupy very low resources and may require only a few hundred kilograms of memory. It is a truly open source, unlimited database, cross-platform, supporting Linux, Mac, Android, […]