概述
五.
六.
>>> from myApp.models import Grades, Students
>>> from django.utils import timezone
>>> from datetime import *
>>> Grades.objects.all()
<QuerySet []>
>>> grade1 = Grades()
>>> grade1.gname = "python04"
>>> grade1.gdate = datetime(year=2017,month=7,day=17)
>>> grade1.ggirlnum = 3
>>> grade1.gboynum =70
>>> grade1.save()
>>> from myApp.models import Grades, Students
>>> from django.utils import timezone
>>> from datetime import *
>>> grade2 = Grades()
>>> grade2.gname = "python05"
>>> grade2.gdate = datetime(year=2017,month=7,day=31)
>>> grade2.ggirlnum =1
>>> grade2.gboynum =100
>>> grade2.save()
>>> g = Grades.objects.get(pk=2)
>>> g.gboynum = 99
>>> g.save()
>>> exit()
七.
八.
最后
以上就是沉静摩托为你收集整理的《千锋Django培训》网课笔记(从5到8)的全部内容,希望文章能够帮你解决《千锋Django培训》网课笔记(从5到8)所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复