05 2023 档案

摘要:#### ensure_ascii ```python import json dict1 = {'name': '时间', 'data': ['2023-04-13 05:00']}, {'name': '雨量mm/h', 'data': ['0.0000']}, {'name': '温度℃', 阅读全文
posted @ 2023-05-30 12:21 是阿杰呀 阅读(120) 评论(0) 推荐(0) 编辑
摘要:自定义分页类 # from rest_framework.pagination import PageNumberPagination from rest_framework.response import Response class MyPagination(PageNumberPaginati 阅读全文
posted @ 2023-05-18 14:53 是阿杰呀 阅读(8) 评论(0) 推荐(0) 编辑
摘要:1. 进程 Process 1.1 多进程 # -*- coding: UTF-8 -*- """ # 计算8的20次方 """ import time import os from multiprocessing import Process import os import time def l 阅读全文
posted @ 2023-05-16 15:38 是阿杰呀 阅读(29) 评论(0) 推荐(0) 编辑
摘要:获取数据表的字段 from core import models temp_val = models.FactorInfo._meta.get_fields() field_list = [i.name for i in temp_val] # ['enterpriseinfo', 'siteinf 阅读全文
posted @ 2023-05-15 17:08 是阿杰呀 阅读(144) 评论(0) 推荐(0) 编辑
摘要:更新包版本 pip3 install --upgrade django-cors-headers 阅读全文
posted @ 2023-05-12 12:24 是阿杰呀 阅读(53) 评论(0) 推荐(0) 编辑
摘要:1. Trunc # 获取每个月 count总数 from django.db.models import Sum from django.db.models.functions import Trunc models.NafpComplete.objects.filter().annotate(m 阅读全文
posted @ 2023-05-04 11:20 是阿杰呀 阅读(39) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示