笔记
yuntaoWei
这个作者很懒,什么都没留下…
展开
-
Django3 python3 model field extra query, the field value is a string separated by commas
from django.db.backends.utils import CursorDebugWrapperfrom django.db import connectionfrom django.db.backends.mysql.base import DatabaseWrapperfrom pymysql.cursors import Cursorfrom collections import Iterablefrom django.db.models import Model,Count原创 2020-12-23 10:16:56 · 136 阅读 · 0 评论 -
Django与sql语句
https://www.cnblogs.com/fixdq/p/9210647.html转载 2020-07-28 16:39:39 · 118 阅读 · 0 评论 -
mysql千万级表加字段操作记录
链接:https://cloud.tencent.com/developer/article/1524019create table new_origin_order_line like origin_order_line;## 生成删除索引语句SELECT CONCAT('ALTER TABLE ',i.TABLE_NAME,' DROP INDEX ',i.INDEX_NAME,';') FROM INFORMATION_SCHEMA.STATISTICS i WHERE TABLE_SCHE转载 2020-05-13 17:36:43 · 1359 阅读 · 0 评论 -
生成唯一标识id
链接:https://blog.csdn.net/dream_coder_21/article/details/45198555``def sys_order_id(): ''' 在高并发分布式情况下生成唯一标识id 参考链接: https://blog.csdn.net/dream_coder_21/article/details/45198555 ''' import random import threading import ctype原创 2020-05-12 15:50:27 · 281 阅读 · 0 评论 -
MySQL server has gone away (BrokenPipeError(32, 'Broken pipe'))
链接:https://www.jianshu.com/p/89f2122eb62fhttps://blog.csdn.net/sunny05296/article/details/80446944max_allowed_packet[mysqld]max_allowed_packet = 100Mset global max_allowed_packet = 100 * ...转载 2020-05-04 10:56:18 · 1303 阅读 · 0 评论 -
cached_property描述器
Django3.0.3 cached_property类描述器 作装饰器缓存实例的方法一次性计算结果class A: def __init__(self, *args, **kwargs): print('init',self, args, kwargs, sep='<--->') def __get__(self, instance, own...原创 2020-05-04 10:51:18 · 254 阅读 · 0 评论 -
mysql[HY000][1025] Error on rename of './starpro/oms_menu' to './starpro/#sql2-1478-ad8' (errno: -1)
找到错误日志查看错误日志linux 错误13 代表没有权限参考 https://blog.csdn.net/chenjiayi_yun/article/details/16920967解决 https://blog.csdn.net/qq_44895681/article/details/104937426?depth_1-utm_source=distribute.pc_relev...转载 2020-04-23 17:27:57 · 216 阅读 · 0 评论 -
Django 1.11.11 ORM 内关联 起别名 尝试CASE WHEN
这是模型类class Market(models.Model): """市场""" id = models.AutoField(primary_key=True) market_name = models.CharField(max_length=100L, unique=True, help_text='市场名称') market_url = models.Ch...原创 2020-04-16 19:15:06 · 598 阅读 · 0 评论 -
python3 typing 部分测试学习
# https://docs.python.org/zh-cn/3/library/typing.htmlfrom typing import List,Tuple,Union,Any,ClassVar,Callabledef py3test(a:int, b:int or str, c:List[str or int]=None) -> Tuple[str, Union[bool,...原创 2020-04-08 10:06:32 · 174 阅读 · 0 评论 -
chrome://plugins
转载: http://www.cnplugins.com/tool/chrome-plugins.htmlchrome的flash无法使用,用户可以在chrome://components/里插件abode flash player是够有最新版需要更新。如果你想让所有网站都默认启用 flash 不用一个个的添加。可以访问这里:chrome://flags/#run-all-flash-in-al...转载 2020-03-14 11:03:46 · 1134 阅读 · 0 评论 -
关于DJANGO3.0 SESSIONID的生成与存储
xxx原创 2020-03-13 10:39:12 · 863 阅读 · 0 评论 -
pycharm配置docker环境记录20200219
xxxx原创 2020-02-19 16:15:21 · 538 阅读 · 0 评论 -
django1.11.11 bulk_create报错 Duplicate重复插入已存在的错误
pip3 show djangocd /home/yuntao/.local/lib/python3.5/site-packages/djangovi db/models/sql/compiler.py:?def as_sql# result = ['INSERT INTO %s' % qn(opts.db_table)]# modify by yuntaoWei 2020-02-1...原创 2020-02-10 10:01:48 · 1689 阅读 · 0 评论