摘要:
#_author:来童星#date:2020/4/19#循环实现评论数据结构comment_list=[ {"id":1,"content":"python最厉害","user":"来星星","parent_id":None}, {"id":2,"content":"GO最厉害","user":"来 阅读全文
摘要:
字段用处: 1. admin中验证 2.obj.clean_fields() 3. (1) form组件验证 (2)model组件操作数据 username email 4.ModelForm ModelForm组件验证 用户models中的字段 model组件操作数据 username email 阅读全文
摘要:
models中代码: class Test(models.Model): username=models.CharField(max_length=32,) email=models.EmailField()views中代码: def test(req): obj=models.Test(name= 阅读全文