- 博客(12)
- 收藏
- 关注
原创 ubuntu 20.04安装virtualenv和virtualenvwrapper安装及使用
配置Python3.6环境Ubuntu20.04已经默认安装了python3.8.5,没有安装pip安装pip3命令:sudo apt install python3-pip安装 virtualenv 和 virtualenvwrapper:pip3 install virtualenvpip3 install virtualenvwrapper# 创建虚拟环境的根目录mkdir $HOME/.Env#配置环境变量sudo vim ~/.bashrc..
2021-05-23 23:52:32
2291
1
原创 Django常用命令大全
创建项目(blog)django-admin startproject blog运行项目 python3 manage.py runserver
2021-04-11 21:56:04
103
原创 苹果Mac电脑快速安装python pip3的命令
安装命令:curl https://bootstrap.pypa.io/get-pip.py | python3查看是否安装成功pip3 --versionsunlei@sunleideiMac ~ % curl https://bootstrap.pypa.io/get-pip.py | python3 % Total % Received % Xferd Average Speed Time Time Time Current ...
2021-04-06 19:48:41
511
原创 thinkphp5验证类中唯一(unique)类型的修改操作提示已存在
编辑界面增加隐藏域传递主键id,TP会自动识别是否需要判断唯一性<input type="hidden" name="id" value="{id}">重点是name要和主键同名
2021-04-06 17:22:36
672
原创 fastamdin 表格的中按钮buttons显示和隐藏判断
一个表格中使用了两个按钮,判断字段的值来显示和隐藏。实现代码如下 buttons: [ { name: 'data', text: '领取数据', title: '领取数据',
2021-04-05 23:40:42
799
原创 fastadmin 表格table 取消双击编辑功能
在public/assets/js/backend/找到响应的js文件,找到如下代码(接近最后的位置):// 为表格绑定事件Table.api.bindevent(table);添加如何代码:table.off('dbl-click-row.bs.table');
2021-04-05 23:33:15
1589
1
原创 fastadmin中一对一表关联写法
控制器写法添加类属性,是否是关联查询protected $relationSearch = true; public function index() { //设置过滤方法 $this->request->filter(['strip_tags', 'trim']); if ($this->request->isAjax()) { //如果发送的来源是Selectpage,则转发到Selec
2021-04-05 19:33:50
823
原创 ubuntu20.04安装谷歌输入法命令
安装Fcitxsudo apt install fcitx配置Fcitxim-config重启电脑让配置生效sudo reboot安装谷歌输入法sudo apt install fcitx-googlepinyin配置谷歌输入法,加Google Pinyin输入法(如果没有出现谷歌输入法就重启下电脑)fcitx-config-gtk3...
2021-04-05 08:36:43
428
原创 谈谈对python中闭包和装饰器的理解
闭包闭包的定义的三个重要点:1、必须是函数嵌套2、内部函数引用了外部函数的变量3、外部函数返回内部函数def out_fun(name): def inner_fun(msg): print(f'{name}:{msg}') return inner_funzhangsan = out_fun('张三')zhangsan('今天周末不用上班') ...
2021-04-01 08:27:38
71
原创 推荐使用DBeaver软件管理mysql数据库
为什么我会推荐它呢?免费跨平台官网:https://dbeaver.io/支持流行的数据库例如:MySQL,PostgreSQL,SQLite,Oracle,DB2,SQL Server,Sybase,MS Access,Teradata,Firebird,Apache Hive,Phoenix,Presto等社区版免费,足够开发中使用了。...
2021-03-30 08:51:29
206
原创 ubuntu像window系统设置本地域名解析配置
首先打开配置文件路径如下:sudo gedit /etc/hosts我的本机默认代码如下127.0.0.1 localhost127.0.1.1 lei# The following lines are desirable for IPv6 capable hosts::1 ip6-localhost ip6-loopbackfe00::0 ip6-localnetff00::0 ip6-mcastprefixff02::1 ip6-allnodesff02::2 ip6-al
2021-03-30 08:15:53
1252
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人