摘要:
import random def get_ua(): first_num = random.randint(55, 62) third_num = random.randint(0, 3200) fourth_num = random.randint(0, 140) os_type = [ '(W 阅读全文
摘要:
# Create your views here. from django.views import View # http://127.0.0.1:8000/books/ from rest_framework.authentication import SessionAuthentication 阅读全文
摘要:
BooleanField -> BooleanField() NullBooleanField -> NullBooleanField() CharField -> CharField(max_length=None, min_length=None, allow_blank=False, trim 阅读全文
摘要:
# 基本查询 print(BookInfo.objects.all()) print(BookInfo.objects.get(btitle='雪山飞狐').id) print(BookInfo.objects.get(id=3)) print(BookInfo.objects.get(pk=3)) 阅读全文