Django 模板中使用 widthratio 标签实现 乘法、除法 运算 先看官方文档 http://doc.codingdict.com/django/ref/templates/builtins.html#std:templatetag-widthratio(中文) https://docs.dj ... continue reading django zhuoyuebiji 2020/3/29 1139
Django 使用邮箱登录(扩展用户表、继承 AbstractUser) # 前提 继承 django 自带的用户类(AbstractUser) # 环境 1. python: 3.6.x 2. django==1.11.22 # ... continue reading django zhuoyuebiji 2019/7/25 1129
Django Admin Show Image from Imagefield(Django admin 图片预览) 在 Django 管理后台中,图片字段(ImageField)默认是显示路径,期望能看到图片预览图。 编写 ImageWidgetAdmin 继承 admin.ModelAdmin, 编写自 ... continue reading django zhuoyuebiji 2020/4/15 1129
Jenkins 之 Android 打包及上传至蒲公英 准备条件 iMAC,非必须(如果是 安卓 和 苹果 可以在同一台电脑上打包则要 Mac OS 系统的电脑,如果是只是给安卓打包 windows 电脑也是可以的, window 下 需要把 ls 换成 dir ... continue reading 软件测试 zhuoyuebiji 2019/6/11 1127
Centos 查看端口是否被使用(netstat 和 lsof) [root@VM_2_29_centos ~]# netstat -anp | grep 9090 tcp 0 0 127.0.0.1:9090 0.0.0.0:* ... continue reading centos zhuoyuebiji 2020/5/21 1127
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running 产生原因: 安装 docker 后没有启动 docker 解决方法1: su root # 先切换到root用户, 再执行以下命令 systemctl enable docker # 开机自动启动docker ... continue reading docker zhuoyuebiji 2021/4/12 1127
Sentry 错误监控(Django 错误监控) Sentry 官网 https://sentry.io 邮件提醒 错误列表 Python 安装和使用 Install our Python SDK using pip: $ ... continue reading 软件测试 zhuoyuebiji 2019/6/13 1115
Centos7 mysqlclient ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. 安装环境 django 2.2 centos 7 错误日志 pip install mysqlclient (qingjiu) [root@VM_16_3_centos running]# pip in ... continue reading django zhuoyuebiji 2020/3/30 1115
Django import_export 个性化导出 model 里的 字段含有 choice 的值 models.py class UserProfile(AbstractUser): """ 用户 """ gender_choice = ( ("0", "女"), ... continue reading django zhuoyuebiji 2020/12/8 1115
Django 获取富文本编辑器中的图片地址(缩略图、封面) 开发环境 1. python: 3.6.8 2. django==1.11.22 models.py from django.db import models from django ... continue reading django zhuoyuebiji 2019/7/26 1105