1. Introduction Graphviz is an open-source drawing toolkit developed at Bell Labs. It uses a specific DSL (domain-specific language), DOT, as its scripting language. It uses layout engines to parse DOT scripts and complete automatic layout. It supports a rich set of export formats, such as PNG, JPG, PostScript, SVG,
1. Basic Concepts Django ships with a signal dispatcher built in. Signals help decouple program modules. When an event occurs elsewhere in the application, a designated function is notified. Signals let certain senders notify a group of receivers that some action has taken place. 2. Using Signals 2.1 Declaring a
1, Initializing the Project vue-cli is the official project scaffold released by Vue; using vue-cli, you can quickly create a Vue + Webpack project.
1 2 3 4 5 6 7 8 9 10 npm install -g vue-cli # Install vue-cli globally vue init webpack myproject # Create a vue project; when it runs, it prompts for information about the project cd myproject # Enter the project npm install # Install the dependency packages; a new node_modules folder is created and the packages are installed there npm run dev # Run locally, by default at http://localhost:8080, starting the service 2, Directory Structure 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |--build //folder for webpack-related code | |--build.
Django has two kinds of views: function-based views and class-based views. The role of a view is mainly to fill in logic and return a response body. Function-based views are hard to extend and have a low rate of code reuse. Class-based views, on the other hand, can use inheritance
1. Permission Management in DRF Permission management in Django REST Framework consists of two parts.
One is Authentication. It specifies how the user is authenticated, obtaining request.user. The other is Permissions. It performs permission control over Django resources and user categories. 1.1 Authentication Methods The relevant source is in the rest_framework/authentication.