This article is about python programming skills from afternerd
Django Views
In django, there’re three terms about views. They’re:
- Function-Based Views (FBV)
- Class-Based Views (CBV)
- Generic Class-Based Views (GCBV)
Git Ignore Template for Python
How to write a .gitignore
file for python projects?
Most beginners will write it manually with project increase, and without the sense to classify the ignore file content.
I found a Git repository contains all the ignore file templates for most programming languages.
Flake8 With Django
I’m working on an Django project. I want to add flake8 to check my django codes today, and make code changes must be checked before commit.
Here’s what I did.
Hexo Deploy Without Password
This articles talks about how to deploy hexo blog to hexo page services without enter username and password.
The key process is to config hexo _config.yml
, and change the deploy
segement.1
2
3
4deploy:
type: git
repo: git@github.com:username/repository-name.github.io.git
branch: master
For more details, step below:
斐波拉契O(1)算法
第n个斐波拉契数的O(1)算法
1 | def fib(n): |