公司 web 框架用的是 django, 以前没用过,打算这两周好好看看. 边学习边整理一下笔记,加深理解. 好像谁说过初学者更适合写入门级的教程,我觉得有一定道理. 高手写的教程有一定深度,不会写入门级的教程,像 深入理解Java虚拟机:JVM高级特性与最佳实践 之类. 大家写的都是经典,像 SICP The c programming language 等等. 基础的东西都很好学,是必备能力.在掌握基础的同时还应该多修炼修炼内功.内外兼修,努力使自己成为更优秀的工程师.…
form 也没什么可说的,我只给一个例子大家就懂了 form model from django import forms class UserForm(forms.Form): username = forms.CharField(label='UserName', max_length=100) password = forms.CharField(label='Password', max_length=20, widget=forms.PasswordInput()) views.py…
EXTRACTED from the Django document It's a common need to filter down the objects given in a list page by some key in the URL. Handily, the ListView has a get_queryset() method we can override. Previously, it has just been returning the value of the q…