上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 22 下一页
摘要: """Django settings for Django01 project.Generated by 'django-admin startproject' using Django 3.1.4.For more information on this file, seehttps://docs 阅读全文
posted @ 2021-01-06 20:55 zxy_ang 阅读(233) 评论(0) 推荐(0)
摘要: import jsonfrom django.shortcuts import renderfrom django.http import JsonResponse, Http404from django.views import Viewfrom interfaces.models import 阅读全文
posted @ 2021-01-05 13:44 zxy_ang 阅读(90) 评论(0) 推荐(0)
摘要: import jsonfrom django.shortcuts import renderfrom django.http import JsonResponse, Http404from django.views import Viewfrom interfaces.models import 阅读全文
posted @ 2021-01-02 20:22 zxy_ang 阅读(120) 评论(0) 推荐(0)
摘要: 复制: 1.提供了定义序列化器Serializer的方法,可以快速根据Django ORM 或者其他库自动序列化/反序列化2.提供了丰富的类视图\MIXIN扩展类,简化视图的编写3.丰富的定制层级:函数视图\类视图\试图结合到自动生成API,满足各种需要4.多种身份认证和权限认证方式的支持5.内置了 阅读全文
posted @ 2021-01-02 20:12 zxy_ang 阅读(508) 评论(0) 推荐(0)
摘要: class MyView(View): def get(self, requests): """ 查询集: # 查询姐相当于列表,支持正值切片,索引,for等等 # 查询集对数据库进行优化,会缓存结果 # 惰性查询 # 链式调用,性能优化 """ # one_obj = Projects.objec 阅读全文
posted @ 2020-12-30 21:41 zxy_ang 阅读(152) 评论(0) 推荐(0)
摘要: orm相对原生sql会有些性能消耗,但随着硬件设备的更新,这些消耗会微不足道; 最后orm也可以执行原生sql。 阅读全文
posted @ 2020-12-27 17:08 zxy_ang 阅读(447) 评论(0) 推荐(0)
摘要: from django.db import models# Create your models here.class BaseModel(models.Model): id = models.AutoField(primary_key=True, verbose_name='主键', help_t 阅读全文
posted @ 2020-12-27 17:00 zxy_ang 阅读(59) 评论(0) 推荐(0)
摘要: from django.db import models# Create your models here.from utils.base_model import BaseModelclass InterFaces(BaseModel): name = models.CharField(max_l 阅读全文
posted @ 2020-12-27 16:56 zxy_ang 阅读(84) 评论(0) 推荐(0)
摘要: from django.db import models# Create your models here.from utils.base_model import BaseModelclass People(models.Model): name = models.CharField(max_le 阅读全文
posted @ 2020-12-27 16:54 zxy_ang 阅读(122) 评论(0) 推荐(0)
摘要: # __author: "ZXYang"# date: 2020/12/23"""进程池:ProcessPoolExecutormax_workers: 最多进程数(6)"""import timefrom concurrent.futures.process import ProcessPoolE 阅读全文
posted @ 2020-12-23 22:40 zxy_ang 阅读(1002) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 22 下一页