Posts
Jekyll Search Options
· β˜• 2 min read
Introduction: Jekyll is a static HTML generation tool. Our documentation system is deployed with Jekyll, which ultimately converts Markdown into HTML files for output. The search requirement is: given a keyword, match it against a document’s title or content and list the matching documents. 1. Option One: Simple-Jekyll-Search Reference: https://github.com/christian-fei/Simple-Jekyll-Search

Django Signals
· β˜• 3 min read
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

Vue + Webpack Development
· β˜• 4 min read
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 Class-Based Views
· β˜• 2 min read
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

Automated Testing in Django
· β˜• 2 min read
Automated testing in Django can be done with doctests or unit tests. The logic of automated testing is to pass test data into the function under test, then use whether the output matches the expected result as the criterion for whether the test passes. There are a few key points