摘要: cornHPA兼容HPA yaml配置apiVersion: apps/v1 kind: Deployment metadata: name: python-django labels: app: nginx spec: replicas: 2 selector: matchLabels: app: 阅读全文
posted @ 2021-06-01 15:21 李瑞鑫 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 查找列表中最大或者最小值 def findmax(list): max = list[0] for i in range(len(list)): if list[i]>max: max=list[i] return max def FindSmall(list): min=list[0] for i 阅读全文
posted @ 2021-05-25 16:25 李瑞鑫 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 在centos上使用yum安装rabbitmq-server rabbitmq及其依赖环境 rabbitmq安装之前需要安装socat,否则直接安装rabbitmq可能会报错 如果没有找到,则先安装epel源 yum -y install epel-release yum install socat 阅读全文
posted @ 2020-04-14 18:23 李瑞鑫 阅读(1019) 评论(0) 推荐(0) 编辑
摘要: import os,time import requests,json # def downloadFile(name, url): # headers = {'Proxy-Connection': 'keep-alive'} # r = requests.get(url, stream=True, headers=headers) # length = float(r... 阅读全文
posted @ 2019-05-20 19:53 李瑞鑫 阅读(2343) 评论(0) 推荐(0) 编辑
摘要: requests 下载视频 阅读全文
posted @ 2019-05-20 17:02 李瑞鑫 阅读(1524) 评论(1) 推荐(1) 编辑
摘要: 在 manage.py 同级目录 创建 uwsgi.ini 文件 ,内容如下: nginx vhost 中创建 django.conf 文件 安装 uwsgi 模块 /usr/local/python3/bin/pip3 install uwsgi 启动项目 /usr/local/python3/b 阅读全文
posted @ 2019-03-21 22:00 李瑞鑫 阅读(5419) 评论(0) 推荐(0) 编辑
摘要: django orm choice字段 阅读全文
posted @ 2018-11-11 12:01 李瑞鑫 阅读(2458) 评论(1) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*-# Generated by Django 1.11.11 on 2018-09-02 08:07from __future__ import unicode_literals from django.conf import settingsfrom d 阅读全文
posted @ 2018-09-30 11:52 李瑞鑫 阅读(994) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/liwenzhou/p/9519321.html 阅读全文
posted @ 2018-09-20 16:03 李瑞鑫 阅读(363) 评论(0) 推荐(0) 编辑
摘要: Django REST framework 是用于构建Web API 的强大而灵活的工具包。 我们可能想使用REST框架的一些原因: Web浏览API对于开发人员来说是一个巨大的可用性。 认证策略包括OAuth1a和OAuth2的包。 支持ORM和非ORM数据源的序列化。 如果你不需要更强大的功能, 阅读全文
posted @ 2018-06-01 10:50 李瑞鑫 阅读(25448) 评论(0) 推荐(0) 编辑