首页 > 代码库 > Django 进阶篇

Django 进阶篇

 

 

 

>>> models.UserInfo.objects.create(username=‘jason‘,pwd=‘56789‘,user_type_id=‘1‘)<UserInfo: UserInfo object>>>> models.UserInfo.objects.values()<QuerySet [{‘pwd‘: ‘56789‘, ‘username‘: ‘jason‘, ‘id‘: 1, ‘user_type_id‘: 1}]>>>> models.UserInfo.objects.values().get(id=1){‘pwd‘: ‘56789‘, ‘username‘: ‘jason‘, ‘id‘: 1, ‘user_type_id‘: 1}>>> models.UserInfo.objects.update(pwd=F(‘pwd‘)+1)1>>> models.UserInfo.objects.values().get(id=1){‘pwd‘: ‘56790‘, ‘username‘: ‘jason‘, ‘id‘: 1, ‘user_type_id‘: 1}>>> 

 

Django 进阶篇